|
DUECA/DUSIME
|
Implementation of a scaling/converting device, that produces a discrete number of different output values depending on a continous input. More...
#include <StepsN.hxx>


Public Member Functions | |
| StepsN (unsigned int n, double yi[], double ui[]) | |
| Constructor. | |
| StepsN (const StepsN &o) | |
| Copy constructor. | |
| StepsN & | operator= (const StepsN &o) |
| Assignment. | |
| ~StepsN () | |
| Destructor. | |
| double | operator() (const double x) const |
| The operator. | |
| std::ostream & | print (std::ostream &os) const |
| Print the object. | |
Public Member Functions inherited from dueca::SimpleFunction | |
| SimpleFunction () | |
| Constructor. | |
| virtual | ~SimpleFunction () |
| Destructor. | |
Implementation of a scaling/converting device, that produces a discrete number of different output values depending on a continous input.
This can be used to e.g. implement IO signals for a flap handle.
To create the object, call the constructor with a list of desired output values and a list of corresponding raw input values. When called to convert an input value, the closest input value from the list is found, and the corresponding output is returned.
| dueca::StepsN::StepsN | ( | unsigned int | n, |
| double | yi[], | ||
| double | ui[] ) |
Constructor.
| n | Number of input-output value pairs. |
| yi | Set of possible output values for this device. |
| ui | Input values corresponding to the output values. |
|
virtual |