fesa-core  4.0.0
fesa::FunctionList Class Reference

Represents a FESA function list. A FunctionList has always its own copy of the data if not explicitly specified. Consequently, the data passed to its constructor can be safely destroyed. More...

#include <FunctionList.h>

Inheritance diagram for fesa::FunctionList:
fesa::ImmutableFunctionList

Public Member Functions

 FunctionList (const ImmutableArray2D< double > &x, const ImmutableArray2D< double > &y)
 Construct a function list from two 2D arrays of points specified as Array2D. The points are copied. More...
 
 FunctionList (const double x[], const double y[], std::size_t nRows, std::size_t nCols)
 
 FunctionList (const ImmutableArray< double > &data, bool checkValidity=true)
 Constructor using a function list specified as an ImmutableArray. No copy of the data is performed. More...
 
 FunctionList (const double data[], const std::size_t size, bool copyData=true, bool checkValidity=true, bool forceValid=false)
 
 FunctionList (const ImmutableFunctionList &other)
 Conversion constructor. The data is copied and this object will work on its own data. More...
 
 FunctionList (const FunctionList &other)
 Copy constructor. The data is copied and this object will work on its own data. More...
 
FunctionsIterator begin ()
 Get a mutable iterator pointing to the first function in the list.
 
FunctionsIterator end ()
 Get a mutable iterator pointing to the location of a function that would theoretically follow the last function in the list.
 
- Public Member Functions inherited from fesa::ImmutableFunctionList
 ImmutableFunctionList (const ImmutableArray< double > &data, bool checkValidity=true)
 Constructor using a function list specified as an ImmutableArray. No copy of the data is performed. More...
 
 ImmutableFunctionList (const double data[], const std::size_t size, bool copyData=false, bool checkValidity=true, bool forceValid=false)
 Constructor using a function list specified as an array. More...
 
 ImmutableFunctionList (const ImmutableArray2D< double > &x, const ImmutableArray2D< double > &y)
 Construct a function list from two 2D arrays of points specified as Array2D. The points are copied. More...
 
 ImmutableFunctionList (const double x[], const double y[], std::size_t nRows, std::size_t nCols)
 Construct a function list from two flat arrays of points. The points are copied. More...
 
 ImmutableFunctionList (const ImmutableFunctionList &other)
 Copy constructor. If 'other' has its own data, the data is copied and this object will work on its own data as well. Otherwise, no copy is performed, and this object will use the same data as 'other'. More...
 
bool isValid () const
 
std::size_t getNFunctions () const
 
std::size_t getTotalNPoints () const
 
std::size_t getNPoints (std::size_t function) const
 
std::size_t getMaxNPoints () const
 
bool hasOwnData () const
 
const double * get (std::size_t &size) const
 
ImmutableArray< double > get () const
 
const double * getX (std::size_t &nRows, std::size_t &nCols) const
 
ImmutableArray2D< double > getX () const
 
const double * getY (std::size_t &nRows, std::size_t &nCols) const
 
ImmutableArray2D< double > getY () const
 
double getXValue (std::size_t function, std::size_t point) const
 
double getYValue (std::size_t function, std::size_t point) const
 
FunctionList getMutable () const
 
ConstFunctionsIterator begin () const
 Get a constant iterator pointing to the first function in the list.
 
ConstFunctionsIterator end () const
 Get a constant iterator pointing to the location of a function that would theoretically follow the last function in the list.
 

Additional Inherited Members

- Static Public Member Functions inherited from fesa::ImmutableFunctionList
static std::size_t getMaxNElements (std::size_t nFunctions, std::size_t maxNPoints)
 
- Protected Member Functions inherited from fesa::ImmutableFunctionList
std::size_t findPoint (std::size_t function, std::size_t point, ImmutableFunctionList::CoordinateOffset coordinateOffset) const
 
- Protected Attributes inherited from fesa::ImmutableFunctionList
std::vector< double > ownData_
 
const double * data_
 
const std::size_t size_
 
const std::vector< const double * > functionPtrs_
 
Array x_
 
Array y_
 
boost::tribool valid_
 

Detailed Description

Represents a FESA function list. A FunctionList has always its own copy of the data if not explicitly specified. Consequently, the data passed to its constructor can be safely destroyed.

Constructor & Destructor Documentation

fesa::FunctionList::FunctionList ( const ImmutableArray2D< double > &  x,
const ImmutableArray2D< double > &  y 
)

Construct a function list from two 2D arrays of points specified as Array2D. The points are copied.

Parameters
xAn array of x-coordinates of the functions' points
yAn array of y-coordinates of the functions' points
fesa::FunctionList::FunctionList ( const double  x[],
const double  y[],
std::size_t  nRows,
std::size_t  nCols 
)

fesa::FunctionList::FunctionList ( const ImmutableArray< double > &  data,
bool  checkValidity = true 
)

Constructor using a function list specified as an ImmutableArray. No copy of the data is performed.

Parameters
dataAn array describing a function list
checkValidityIf true, the data of the function list is checked for validity
Exceptions
FesaExceptionIf checkValidity is true and data is not valid
fesa::FunctionList::FunctionList ( const double  data[],
const std::size_t  size,
bool  copyData = true,
bool  checkValidity = true,
bool  forceValid = false 
)

fesa::FunctionList::FunctionList ( const ImmutableFunctionList other)

Conversion constructor. The data is copied and this object will work on its own data.

Parameters
otherThe other function list
fesa::FunctionList::FunctionList ( const FunctionList other)

Copy constructor. The data is copied and this object will work on its own data.

Parameters
otherThe other function list

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