bpp-core3  3.0.0
bpp::ParameterGrid Class Reference

This class is a data structure to specify a set of parameter values (most likely for evaluation by a Function) More...

#include <Bpp/Numeric/Function/FunctionTools.h>

+ Collaboration diagram for bpp::ParameterGrid:

Public Member Functions

 ParameterGrid ()
 
virtual ~ParameterGrid ()
 
void addDimension (const std::string &name, const Vdouble &values)
 Add a new dimension (parameter name + corresponding values). More...
 
const std::vector< std::string > & getDimensionNames () const
 
const std::string & getDimensionName (unsigned int i) const
 
size_t getNumberOfDimensions () const
 
size_t getTotalNumberOfPoints () const
 
const VVdoublegetPoints () const
 
const VdoublegetPointsForDimension (unsigned int i) const
 
const VdoublegetPointsForDimension (const std::string &name) const
 

Private Attributes

std::vector< std::string > names_
 
VVdouble grid_
 

Detailed Description

This class is a data structure to specify a set of parameter values (most likely for evaluation by a Function)

See also
FunctionTools

Definition at line 55 of file FunctionTools.h.

Constructor & Destructor Documentation

◆ ParameterGrid()

bpp::ParameterGrid::ParameterGrid ( )
inline

Definition at line 62 of file FunctionTools.h.

◆ ~ParameterGrid()

virtual bpp::ParameterGrid::~ParameterGrid ( )
inlinevirtual

Definition at line 63 of file FunctionTools.h.

Member Function Documentation

◆ addDimension()

void ParameterGrid::addDimension ( const std::string &  name,
const Vdouble values 
)

Add a new dimension (parameter name + corresponding values).

Parameters
nameThe name of the dimension (parameter name).
valuesThe values the parameter will take.
Exceptions
Exceptionin case the dimension is note valid (duplicated parameter name for instance).

Definition at line 51 of file FunctionTools.cpp.

Referenced by bpp::NumCalcApplicationTools::getParameterGrid().

◆ getDimensionName()

const std::string& bpp::ParameterGrid::getDimensionName ( unsigned int  i) const
inline

Definition at line 77 of file FunctionTools.h.

References names_.

Referenced by bpp::FunctionTools::computeGrid().

◆ getDimensionNames()

const std::vector<std::string>& bpp::ParameterGrid::getDimensionNames ( ) const
inline

Definition at line 75 of file FunctionTools.h.

References names_.

Referenced by bpp::FunctionTools::computeGrid().

◆ getNumberOfDimensions()

size_t bpp::ParameterGrid::getNumberOfDimensions ( ) const
inline

Definition at line 83 of file FunctionTools.h.

References names_.

Referenced by bpp::FunctionTools::computeGrid().

◆ getPoints()

const VVdouble& bpp::ParameterGrid::getPoints ( ) const
inline

Definition at line 90 of file FunctionTools.h.

References grid_.

Referenced by bpp::FunctionTools::computeGrid().

◆ getPointsForDimension() [1/2]

const Vdouble & ParameterGrid::getPointsForDimension ( const std::string &  name) const

Definition at line 61 of file FunctionTools.cpp.

◆ getPointsForDimension() [2/2]

const Vdouble & ParameterGrid::getPointsForDimension ( unsigned int  i) const

Definition at line 71 of file FunctionTools.cpp.

Referenced by bpp::FunctionTools::computeGrid().

◆ getTotalNumberOfPoints()

size_t ParameterGrid::getTotalNumberOfPoints ( ) const
Returns
The total number of points in the grid, that is the product of all dimension sizes.

Definition at line 78 of file FunctionTools.cpp.

Referenced by bpp::FunctionTools::computeGrid().

Member Data Documentation

◆ grid_

VVdouble bpp::ParameterGrid::grid_
private

Definition at line 59 of file FunctionTools.h.

Referenced by getPoints().

◆ names_

std::vector<std::string> bpp::ParameterGrid::names_
private

Definition at line 58 of file FunctionTools.h.

Referenced by getDimensionName(), getDimensionNames(), and getNumberOfDimensions().


The documentation for this class was generated from the following files: