SuanShu, a Java numerical and statistical library

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

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

public class UnitGrid
extends java.lang.Object
implements TimeGrid

This class represents the discrete time points [0, 1, ......, N] for a stochastic process.


Field Summary
 int N
          the number of time points
 
Constructor Summary
UnitGrid(int N)
          Construct a time grid with time interval 1 between any two successive time points.
 
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

Constructor Detail

UnitGrid

public UnitGrid(int N)
Construct a time grid with time interval 1 between any two successive time points.

Parameters:
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.