fesa-core
4.3.1
|
#include <Function.h>
Public Member Functions | |
Function (const ImmutableFunction &data) | |
template<class InputIterator > | |
Function (InputIterator first, InputIterator last) | |
Function () | |
Point & | getPoint (std::size_t index) |
void | addPoint (const Point &p) |
bool | isValid () const |
const_iterator | begin () const |
const_iterator | end () const |
iterator | begin () |
std::size_t | size () const |
Public Member Functions inherited from fesa::ImmutableFunction | |
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 |
Function | getMutable () const |
Class which represents a function. It extends ImmutableFunction, adding methods to make it modifiable. Objects of this class always have their own data and are mutable.
fesa::Function::Function | ( | const ImmutableFunction & | data | ) |
Constructor. Copies the data of an ImmutableFunction.
fesa::Function::Function | ( | InputIterator | first, |
InputIterator | last | ||
) |
Constructor. Copies points from iterators passed as arguments, range [first, last).
fesa::Function::Function | ( | ) |
Instantiates an empty function.
void fesa::Function::addPoint | ( | const Point & | p | ) |
Adds a point at the end of the function.
|
virtual |
Get a constant iterator pointing to the first point in the function
Reimplemented from fesa::ImmutableFunction.
Function::iterator fesa::Function::begin | ( | ) |
Get an iterator allowing modifications of points in the function
|
virtual |
Get a constant iterator pointing to the point after the last point in the function
Reimplemented from fesa::ImmutableFunction.
Point & fesa::Function::getPoint | ( | std::size_t | index | ) |
Returns a reference to the point at the given index. The reference may be used to modify the point.
|
virtual |
Returns true if the function is valid. valid function:
Reimplemented from fesa::ImmutableFunction.
|
virtual |
Reimplemented from fesa::ImmutableFunction.