SuanShu, a Java numerical and statistical library

com.numericalmethod.suanshu.stats.stochasticprocess.timepoints
Class EvenlySpacedGrid

java.lang.Object
  extended by com.numericalmethod.suanshu.stats.stochasticprocess.timepoints.EvenlySpacedGrid
All Implemented Interfaces:
TimeGrid

public class EvenlySpacedGrid
extends java.lang.Object
implements TimeGrid

This class represents an evenly spaced/discretized time grid for a stochastic process.


Field Summary
 int N
          the number of time points
 double T
          the ending of the time interval
 double T0
          the beginning of the time interval
 
Constructor Summary
EvenlySpacedGrid(double T0, double T, int N)
          Construct an evenly spaced/discretized time grid.
 
Method Summary
 int size()
          the number of time points
 double T()
          the last time point available
 double t(int i)
          the i-th time point in the time grid discretization
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

N

public final int N
the number of time points


T0

public final double T0
the beginning of the time interval


T

public final double T
the ending of the time interval

Constructor Detail

EvenlySpacedGrid

public EvenlySpacedGrid(double T0,
                        double T,
                        int N)
Construct an evenly spaced/discretized time grid.

Parameters:
T0 - the beginning of the time interval
T - the ending of the time interval
N - the number of time points
Method Detail

size

public int size()
Description copied from interface: TimeGrid
the number of time points

Specified by:
size in interface TimeGrid
Returns:
the number of time points

t

public double t(int i)
the i-th time point in the time grid discretization

i ∈ [1, N + 1].

Specified by:
t in interface TimeGrid
Parameters:
i - the index
Returns:
the i-th time

T

public double T()
Description copied from interface: TimeGrid
the last time point available

Specified by:
T in interface TimeGrid
Returns:
the last time point available

SuanShu, a Java numerical and statistical library

Copyright © 2011 Numerical Method Inc. Ltd. All Rights Reserved.