ExponentialFunction Class Documentation
class ExponentialFunction : FunctionNamespace:datalogics_interface
- Inherits from:
Function
Detailed Description
An interpolation between two output values as input values vary across a domain.
For an Exponential Function, the curve between the two values is determined by the exponent N.
Constructor & Destructor Documentation
ExponentialFunction
ExponentialFunction(const std::vector< double > & domain, int n_outputs, const std::vector< double > & c0, const std::vector< double > & c1, double n)Parameters
domain: const std::vector< double > &the domain of the function. 2 elements.
n_outputs: intthe number of outputs of the function
c0: const std::vector< double > &the output value when the input value is 0
c1: const std::vector< double > &the output value when the input value is 1
n: doublethe exponential factor, which alters the curve of output values as the input values vary across the domain.
Create an Exponential Function, which is the exponential interpolation between two output values as the input values vary across the domain.
ExponentialFunction
ExponentialFunction(ExponentialFunction && )Parameters
~ExponentialFunction
~ExponentialFunction()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:
std::vector< double >a list of the result values from the function
Apply the function to supplied input values
get_c0
std::vector< double > get_c0()Returns:
std::vector< double >The values for the function when the input is 0.0. There must be the same number of values as the number of outputs in the function.
get_c1
std::vector< double > get_c1()Returns:
std::vector< double >The values for the function when the input is 1.0. There must be the same number of values as the number of outputs in the function.
get_domain
std::vector< double > get_domain()Returns:
std::vector< double >The domain of the function.
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
double get_n()Returns:
doubleThe exponential factor N.
get_n_inputs
int get_n_inputs()Returns:
intThe number of inputs to the function.
get_n_outputs
int get_n_outputs()Returns:
intThe number of outputs from the function.
operator=
ExponentialFunction & operator=(ExponentialFunction && )Parameters
Returns:
ExponentialFunction &set_c0
void set_c0(const std::vector< double > & c0)Parameters
c0: const std::vector< double > &the values for the function when the input is 0.0. There must be the same number of values as the number of outputs i...
Returns:
voidThe values for the function when the input is 0.0. There must be the same number of values as the number of outputs in the function.
set_c1
void set_c1(const std::vector< double > & c1)Parameters
c1: const std::vector< double > &the values for the function when the input is 1.0. There must be the same number of values as the number of outputs i...
Returns:
voidThe values for the function when the input is 1.0. There must be the same number of values as the number of outputs in the function.
set_domain
void set_domain(const std::vector< double > & domain)Parameters
domain: const std::vector< double > &
Returns:
voidThe domain of the function.
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.
set_n
void set_n(double n)Parameters
n: double
Returns:
voidThe exponential factor N.
to_string
std::string to_string()Returns:
std::stringA string representation of the ExponentialFunction, including the number of inputs and outputs, domain, range, N, C0, and C1 values.
A string value describing the function.