DUECA/DUSIME
Loading...
Searching...
No Matches
Public Member Functions | List of all members
dueca::StepsN Class Reference

Implementation of a scaling/converting device, that produces a discrete number of different output values depending on a continous input. More...

#include <StepsN.hxx>

Inheritance diagram for dueca::StepsN:
Inheritance graph
[legend]
Collaboration diagram for dueca::StepsN:
Collaboration graph
[legend]

Public Member Functions

 StepsN (unsigned int n, double yi[], double ui[])
 Constructor.
 
 StepsN (const StepsN &o)
 Copy constructor.
 
StepsNoperator= (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.
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ StepsN()

dueca::StepsN::StepsN ( unsigned int n,
double yi[],
double ui[] )

Constructor.

Parameters
nNumber of input-output value pairs.
yiSet of possible output values for this device.
uiInput values corresponding to the output values.

Member Function Documentation

◆ operator()()

double dueca::StepsN::operator() ( const double x) const
virtual

The operator.

Parameters
xRaw value
Returns
Converted output.

Implements dueca::SimpleFunction.


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