25package umontreal.ssj.util;
33 private double zeroOverZero = Double.NaN;
49 this.zeroOverZero = zeroOverZero;
82 this.zeroOverZero = zeroOverZero;
91 throw new IllegalArgumentException(
"Invalid length of x");
92 if (x[0] == 0 && x[1] == 0)
99 throw new IllegalArgumentException(
"Invalid length of x");
104 return -x[0] / (x[1] * x[1]);
106 throw new IndexOutOfBoundsException(
"Invalid value of i: " + i);
void setZeroOverZeroValue(double zeroOverZero)
Sets the value returned by evaluate for the undefined function to zeroOverZero.
double evaluateGradient(int i, double... x)
Computes , the derivative of with respect to .
RatioFunction()
Constructs a new ratio function.
double getZeroOverZeroValue()
Returns the value returned by evaluate in the case where the function is calculated.
RatioFunction(double zeroOverZero)
Constructs a new ratio function that returns zeroOverZero for the special case of .
double evaluate(double... x)
Computes the function for the vector x.
int getDimension()
Returns , the dimension of the function computed by this implementation.
Represents a function of multiple variables.