Function Class Documentation
classFunctionNamespace:datalogics_interface
- Derived classes:
- ExponentialFunction, PostScriptCalculatorFunction
Detailed Description
A function takes input values and manipulates them to create output values.
Referenced by
Constructor & Destructor Documentation
Function
Function(Function &&)Parameters
~Function
~Function()Member Function Documentation
apply
std::vector< double >apply(const std::vector< double > &args)Parameters
args: const std::vector< double > &input values for the function. The number of input values must agree with the number of inputs the function takes.
Returns:
a list of the result values from the functionApply the function to supplied input values
get_domain
std::vector< double >get_domain()Returns:
std::vector< double >Contains 2 * m elements, where m is the number of inputs to the function. Each successive pair of elements gives the minimum and maximum values for one of the inputs. Input values to the function are clamped to these minimum and maximum values.
get_n_inputs
intget_n_inputs()Returns:
intThe number of inputs to the function.
get_n_outputs
intget_n_outputs()Returns:
intThe number of outputs from the function.
operator=
Function &operator=(Function &&)Parameters
Returns:
Function &set_domain
voidset_domain(const std::vector< double > &domain)Parameters
domain: const std::vector< double > &
Returns:
voidContains 2 * m elements, where m is the number of inputs to the function. Each successive pair of elements gives the minimum and maximum values for one of the inputs. Input values to the function are clamped to these minimum and maximum values.
to_string
std::stringto_string()Returns:
A string representation of the function.Convert the function to a displayable string.