Function Class Documentation

classFunction

Namespace:datalogics_interface

Derived classes:
ExponentialFunction, PostScriptCalculatorFunction

Detailed Description

A function takes input values and manipulates them to create output values.

Constructor & Destructor Documentation

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

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

int

The number of inputs to the function.

get_n_outputs

intget_n_outputs()

Returns:

int

The number of outputs from 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.

to_string

std::stringto_string()

Returns:

A string representation of the function.

Convert the function to a displayable string.