org.lionoso
Interface FunctionBase


public interface FunctionBase

Interface representing a LIONoso function class.

To import a Java function into LIONoso as a jar, the user must:

The interface can represent (multi-) real-valued functions of real parameters.


Method Summary
 double[] evaluate(double[] x)
          Compute the function at the given point.
 int getDomainDimension()
          Number of input variables.
 double[] getMax()
          Maximum values for all variables in the domain and in the range.
 double[] getMin()
          Minimum values for all variables in the domain and in the range.
 java.lang.String getName()
          Name of the function.
 java.lang.String[] getNames()
          Variable mnemonic names.
 int getRangeDimension()
          Number of ouput variables.
 

Method Detail

evaluate

double[] evaluate(double[] x)
Compute the function at the given point.

Parameters:
x - the point at which the function must be computed.
The array must have at least as many entries as declared by the getDomainDimension function.
Returns:
the array of output values.
The implementation is responsible of creating and maintaining the output array with at least as many entries as declared by the getRangeDimension function.
Since LIONoso will create different FunctionBase objects in case of concurrent evaluation, the output array can safely be allocated by the child class constructor.

getDomainDimension

int getDomainDimension()
Number of input variables.

Returns:
the number of input variables, i.e., the length of the input vector for evaluate.

getRangeDimension

int getRangeDimension()
Number of ouput variables.

Returns:
the number of output variables, i.e., the length of the output vector returned by evaluate.

getNames

java.lang.String[] getNames()
Variable mnemonic names. The name of each input and output variable. The returned array must contain as many entries as the sum of domain and range dimensions.

Returns:
Names for the variables

getMin

double[] getMin()
Minimum values for all variables in the domain and in the range. The returned array must contain as many entries as the sum of domain and range dimensions.

Returns:
Array of minimum values

getMax

double[] getMax()
Maximum values for all variables in the domain and in the range. The returned array must contain as many entries as the sum of domain and range dimensions.

Returns:
Array of maximum values

getName

java.lang.String getName()
Name of the function. A mnemonic name for the function represented by this class.

Returns:
the function name