fesa-core
7.0.0
|
#include <ImmutableFunction.h>
Public Member Functions | |
ImmutableFunction (const ImmutableArray< Point > &data) | |
Constructor using a function specified as an ImmutableArray. No copy of the data is performed. More... | |
ImmutableFunction (const Point *data, std::size_t size) | |
Constructor using a pointer to Points and a size. No copy of the data is performed. More... | |
ImmutableFunction (const double *x, const double *y, std::size_t size) | |
Constructor using a pointer to x and y coordinates, and a size. No copy of the data is performed. More... | |
ImmutableFunction (const_iterator first, const_iterator last) | |
Constructor using iterators to the first and last point (last excluded). More... | |
ImmutableFunction () | |
virtual Point | getPoint (std::size_t index) const |
virtual bool | isValid () const |
Function | getMutable () const |
virtual const_iterator | begin () const |
virtual const_iterator | end () const |
virtual std::size_t | size () const |
Class which represents a function. Objects of this class don't copy data and are immutable. This means that the data used to instantiate them must remain accessible and constant until they are destroyed.
fesa::ImmutableFunction::ImmutableFunction | ( | const ImmutableArray< Point > & | data | ) |
Constructor using a function specified as an ImmutableArray. No copy of the data is performed.
data | an array of points describing a function |
fesa::ImmutableFunction::ImmutableFunction | ( | const Point * | data, |
std::size_t | size | ||
) |
Constructor using a pointer to Points and a size. No copy of the data is performed.
data | an array of points describing a function |
size | the number of elements in the array |
fesa::ImmutableFunction::ImmutableFunction | ( | const double * | x, |
const double * | y, | ||
std::size_t | size | ||
) |
Constructor using a pointer to x and y coordinates, and a size. No copy of the data is performed.
x | an array of x coordinates of points |
y | an array of y coordinates of points |
size | the number of elements in the array |
fesa::ImmutableFunction::ImmutableFunction | ( | const_iterator | first, |
const_iterator | last | ||
) |
Constructor using iterators to the first and last point (last excluded).
first | iterator pointing to the first point of the function |
last | iterator pointing to the point after the last point of the function |
fesa::ImmutableFunction::ImmutableFunction | ( | ) |
Instantiates an empty function.
|
virtual |
Get a constant iterator pointing to the first point in the function
Reimplemented in fesa::Function.
|
virtual |
Get a constant iterator pointing to the point after the last point in the function
Reimplemented in fesa::Function.
Function fesa::ImmutableFunction::getMutable | ( | ) | const |
Returns a Function object that contains a copy of this ImmutableFunction's data.
|
virtual |
Returns the point at the given index. Indexing starts at 0.
|
virtual |
Returns true if the function is valid. valid function:
Reimplemented in fesa::Function.
|
virtual |
Reimplemented in fesa::Function.