bpp-core  2.2.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) throw (Exception)
 Add a new dimension (parameter name + corresponding values). More...
 
const std::vector< std::string > & getDimensionNames () const
 
const std::string & getDimensionName (unsigned int i) const throw (IndexOutOfBoundsException)
 
size_t getNumberOfDimensions () const
 
size_t getTotalNumberOfPoints () const
 
const VVdoublegetPoints () const
 
const VdoublegetPointsForDimension (unsigned int i) const throw (IndexOutOfBoundsException)
 
const VdoublegetPointsForDimension (const std::string &name) const throw (Exception)
 

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 54 of file FunctionTools.h.

Constructor & Destructor Documentation

◆ ParameterGrid()

bpp::ParameterGrid::ParameterGrid ( )
inline

Definition at line 61 of file FunctionTools.h.

◆ ~ParameterGrid()

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

Definition at line 62 of file FunctionTools.h.

Member Function Documentation

◆ addDimension()

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

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 49 of file FunctionTools.cpp.

◆ getDimensionName()

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

Definition at line 76 of file FunctionTools.h.

References names_.

◆ getDimensionNames()

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

Definition at line 74 of file FunctionTools.h.

References names_.

◆ getNumberOfDimensions()

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

Definition at line 82 of file FunctionTools.h.

References names_.

◆ getPoints()

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

Definition at line 89 of file FunctionTools.h.

References grid_.

◆ getPointsForDimension() [1/2]

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

Definition at line 65 of file FunctionTools.cpp.

◆ getPointsForDimension() [2/2]

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

Definition at line 57 of file FunctionTools.cpp.

◆ 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 71 of file FunctionTools.cpp.

Member Data Documentation

◆ grid_

VVdouble bpp::ParameterGrid::grid_
private

Definition at line 58 of file FunctionTools.h.

Referenced by getPoints().

◆ names_

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

Definition at line 57 of file FunctionTools.h.

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


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