Function Class Documentation

class Function

Namespace:datalogics_interface

Derived classes:
ExponentialFunction, PostScriptCalculatorFunction

Detailed Description

A function is a process.

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:

std::vector< double >

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 >

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_inputs

int get_n_inputs()

Returns:

int

The number of inputs to the function.

get_n_outputs

int get_n_outputs()

Returns:

int

The number of outputs from the function.

set_domain

void set_domain(const std::vector< double > & domain)

Parameters

domain: const std::vector< double > &

Returns:

void

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.

to_string

std::string to_string()

Returns:

std::string

A string representation of the function.

Convert the function to a displayable string.