Overview | Package | Class | Tree | Deprecated | Index | Help
| SSJ V. 2.1.1.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## umontreal.iro.lecuyer.functions
Class PiecewiseConstantFunction

    java.lang.Object
      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 distribution function is evaluated
  Returns:
    function evaluated at `x`

Overview | Package | Class | Tree | Deprecated | Index | Help
| SSJ V. 2.1.1.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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