|
ContRap-Libraries
|
Class RealStepFunction represents a step function over the reals. More...
#include <functions.h>
Public Member Functions | |
| RealStepFunction () | |
| Default constructor. | |
| RealStepFunction (const std::vector< double > &breakpoints, const std::vector< double > &values, RealInterval support=RealInterval()) | |
| Creates a step from the breakpoints and the corresponding values. | |
| virtual | ~RealStepFunction () |
| Virtual destructor. | |
| virtual double | operator() (double x) |
| Evaluates the function at a given point. | |
| void | set_data (const std::vector< double > &breakpoints, const std::vector< double > &values, RealInterval support=RealInterval()) |
| Sets the function data. | |
| const std::vector< double > & | get_breakpoints () |
| Returns the breakpoints. | |
| const std::vector< double > & | get_values () |
| Returns the value at the breakpoints. | |
| RealInterval & | get_support () |
| Returns the support of the function. | |
Protected Attributes | |
| std::vector< double > | breakpoints |
| Breakpoints in the ascending order. | |
| std::vector< double > | values |
| Values for the break points. | |
| RealInterval | support |
| Minimum and maximum value. | |
Class RealStepFunction represents a step function over the reals.
| crp::RealStepFunction::RealStepFunction | ( | ) | [inline] |
Default constructor.
| crp::RealStepFunction::RealStepFunction | ( | const std::vector< double > & | breakpoints, |
| const std::vector< double > & | values, | ||
| RealInterval | support = RealInterval() |
||
| ) |
Creates a step from the breakpoints and the corresponding values.
| breakpoints | Break points where the steps occur |
| values | Left associative values for the steps |
| support | Support of the function |
| virtual crp::RealStepFunction::~RealStepFunction | ( | ) | [inline, virtual] |
Virtual destructor.
| const std::vector<double>& crp::RealStepFunction::get_breakpoints | ( | ) | [inline] |
Returns the breakpoints.
| RealInterval& crp::RealStepFunction::get_support | ( | ) | [inline] |
Returns the support of the function.
| const std::vector<double>& crp::RealStepFunction::get_values | ( | ) | [inline] |
Returns the value at the breakpoints.
| virtual double crp::RealStepFunction::operator() | ( | double | x | ) | [virtual] |
Evaluates the function at a given point.
| x | Evaluation point |
Implements crp::RealFunction.
| void crp::RealStepFunction::set_data | ( | const std::vector< double > & | breakpoints, |
| const std::vector< double > & | values, | ||
| RealInterval | support = RealInterval() |
||
| ) |
Sets the function data.
| breakpoints | Break points where the steps occur |
| values | Left associative values for the steps |
| support | Support of the function |
std::vector<double> crp::RealStepFunction::breakpoints [protected] |
Breakpoints in the ascending order.
RealInterval crp::RealStepFunction::support [protected] |
Minimum and maximum value.
std::vector<double> crp::RealStepFunction::values [protected] |
Values for the break points.
1.7.3