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

Constructor & Destructor Documentation

◆ ParameterGrid()

bpp::ParameterGrid::ParameterGrid ( )
inline

Definition at line 27 of file FunctionTools.h.

◆ ~ParameterGrid()

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

Definition at line 28 of file FunctionTools.h.

References addDimension().

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

Referenced by ~ParameterGrid().

◆ getDimensionName()

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

Definition at line 42 of file FunctionTools.h.

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

◆ getDimensionNames()

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

Definition at line 40 of file FunctionTools.h.

References names_.

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

◆ getNumberOfDimensions()

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

Definition at line 48 of file FunctionTools.h.

References getTotalNumberOfPoints().

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

◆ getPoints()

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

Definition at line 55 of file FunctionTools.h.

References getPointsForDimension(), and grid_.

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

◆ getPointsForDimension() [1/2]

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

Definition at line 34 of file FunctionTools.cpp.

Referenced by bpp::FunctionTools::computeGrid(), and getPoints().

◆ getPointsForDimension() [2/2]

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

Definition at line 24 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 41 of file FunctionTools.cpp.

Referenced by bpp::FunctionTools::computeGrid(), and getNumberOfDimensions().

Member Data Documentation

◆ grid_

VVdouble bpp::ParameterGrid::grid_
private

Definition at line 24 of file FunctionTools.h.

Referenced by getPoints().

◆ names_

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

Definition at line 23 of file FunctionTools.h.

Referenced by getDimensionNames().


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