com.graphbuilder.math.func
Interface Function

All Known Implementing Classes:
AbsFunction, AcosFunction, AcoshFunction, AsinFunction, AsinhFunction, AtanFunction, AtanhFunction, AvgFunction, CeilFunction, CombinFunction, CosFunction, CoshFunction, EFunction, ExpFunction, FactFunction, FloorFunction, LgFunction, LnFunction, LogFunction, MaxFunction, MinFunction, ModFunction, PiFunction, PowFunction, RandFunction, RoundFunction, SignFunction, SinFunction, SinhFunction, SqrtFunction, SumFunction, TanFunction, TanhFunction

public interface Function

The Function interface represents a function that takes a number of inputs and returns a value. The number of inputs expected depends on the function. For example, the PiFunction returns the value of Pi regardless of the input. The CosFunction uses the value at index location 0. The PowFunction uses the values at index locations 0 and 1. See the FuncMap class for more information.

See Also:
FuncMap

Method Summary
 boolean acceptNumParam(int numParam)
          Returns true if the numParam is an accurate representation of the number of inputs the function processes.
 double of(double[] param, int numParam)
          Takes the specified double array as input and returns a double value.
 

Method Detail

of

public double of(double[] param,
                 int numParam)
Takes the specified double array as input and returns a double value. Functions that accept a variable number of inputs can take numParam to be the number of inputs.


acceptNumParam

public boolean acceptNumParam(int numParam)
Returns true if the numParam is an accurate representation of the number of inputs the function processes.