|
SSJ V. 2.6. |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectumontreal.iro.lecuyer.util.RatioFunction
public class RatioFunction
Represents a function computing a ratio of two values.
| Constructor Summary | |
|---|---|
RatioFunction()
Constructs a new ratio function. |
|
RatioFunction(double zeroOverZero)
Constructs a new ratio function that returns zeroOverZero for the special case of 0/0. |
|
| Method Summary | |
|---|---|
double |
evaluate(double... x)
Computes the function g(x) for the vector x. |
double |
evaluateGradient(int i,
double... x)
Computes ∂g(x)/∂xi, the derivative of g(x) with respect to xi. |
int |
getDimension()
Returns d, the dimension of the function computed by this implementation. |
double |
getZeroOverZeroValue()
Returns the value returned by evaluate in the
case where the 0/0 function is calculated. |
void |
setZeroOverZeroValue(double zeroOverZero)
Sets the value returned by evaluate for
the undefined function 0/0 to zeroOverZero. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public RatioFunction()
public RatioFunction(double zeroOverZero)
getZeroOverZeroValue method for more information.
The default value of zeroOverZero is Double.NaN.
zeroOverZero - the value for 0/0.| Method Detail |
|---|
public double getZeroOverZeroValue()
evaluate in the
case where the 0/0 function is calculated.
The default value for 0/0 is Double.NaN.
Generally, 0/0 is undefined, and therefore associated with the Double.NaN constant, meaning not-a-number. However, in certain applications, it can be defined differently to accomodate some special cases. For exemple, in a queueing system, if there are no arrivals, no customers are served, lost, queued, etc. As a result, many performance measures of interest turn out to be 0/0. Specifically, the loss probability, i.e., the ratio of lost customers over the number of arrivals, should be 0 if there is no arrival; in this case, 0/0 means 0. On the other hand, the service level, i.e., the fraction of customers waiting less than a fixed threshold, could be fixed to 1 if there is no arrival.
public void setZeroOverZeroValue(double zeroOverZero)
evaluate for
the undefined function 0/0 to zeroOverZero.
See getZeroOverZeroValue for more information.
zeroOverZero - the new value for 0/0.public int getDimension()
MultivariateFunction
getDimension in interface MultivariateFunctionpublic double evaluate(double... x)
MultivariateFunction
evaluate in interface MultivariateFunctionx - a vector
x.
public double evaluateGradient(int i,
double... x)
MultivariateFunction
evaluateGradient in interface MultivariateFunctioni - the variable to derive with respect to.x - a vector
x.
|
SSJ V. 2.6. |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||