ExponentialFunction Class Documentation

classExponentialFunction : Function

Namespace:datalogics_interface

Inherits from:
Function

Detailed Description

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, intn_outputs, const std::vector< double > &c0, const std::vector< double > &c1, doublen)

Parameters

domain: const std::vector< double > &

the domain of the function. 2 elements.

n_outputs: int

the 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: double

the 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()

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 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 >

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

doubleget_n()

Returns:

double

The exponential factor N.

get_n_inputs

intget_n_inputs()

Returns:

int

The number of inputs to the function.

get_n_outputs

intget_n_outputs()

Returns:

int

The number of outputs from the function.

set_c0

voidset_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:

void

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.

set_c1

voidset_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:

void

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.

set_domain

voidset_domain(const std::vector< double > &domain)

Parameters

domain: const std::vector< double > &

Returns:

void

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

voidset_n(doublen)

Parameters

n: double

Returns:

void

The exponential factor N.

to_string

std::stringto_string()

Returns:

A 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.