SSJ
V. 2.6.

umontreal.iro.lecuyer.functions
Class PiecewiseConstantFunction

java.lang.Object
  extended by umontreal.iro.lecuyer.functions.PiecewiseConstantFunction
All Implemented Interfaces:
MathFunction

public class PiecewiseConstantFunction
extends Object
implements MathFunction

Represents a piecewise-constant function.


Constructor Summary
PiecewiseConstantFunction(double[] x, double[] y)
          Constructs a new piecewise-constant function with X and Y coordinates given by x and y.
 
Method Summary
 double evaluate(double x)
          Returns the value of the function evaluated at x.
 double[] getX()
          Returns the X coordinates of the function.
 double[] getY()
          Returns the Y coordinates of the function.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PiecewiseConstantFunction

public PiecewiseConstantFunction(double[] x,
                                 double[] y)
Constructs a new piecewise-constant function with X and Y coordinates given by x and y.

Parameters:
x - the X coordinates.
y - the Y coordinates.
Method Detail

getX

public double[] getX()
Returns the X coordinates of the function.

Returns:
the X coordinates of the function.

getY

public double[] getY()
Returns the Y coordinates of the function.

Returns:
the Y coordinates of the function.

evaluate

public double evaluate(double x)
Description copied from interface: MathFunction
Returns the value of the function evaluated at x.

Specified by:
evaluate in interface MathFunction
Parameters:
x - value at which the function is evaluated
Returns:
function evaluated at x

SSJ
V. 2.6.

To submit a bug or ask questions, send an e-mail to Pierre L'Ecuyer.