SuanShu, a Java numerical and statistical library

com.numericalmethod.suanshu.stats.stochasticprocess.multivariate
Class MultiVariateRealization.Iterator

java.lang.Object
  extended by com.numericalmethod.suanshu.stats.timeseries.TimeSeries.Iterator<E>
      extended by com.numericalmethod.suanshu.stats.timeseries.multivariate.MultiVariateTimeSeries.Iterator<MultiVariateRealization.Entry>
          extended by com.numericalmethod.suanshu.stats.timeseries.multivariate.realtime.MultiVariateRealization.Iterator
              extended by com.numericalmethod.suanshu.stats.stochasticprocess.multivariate.MultiVariateRealization.Iterator
All Implemented Interfaces:
java.util.Iterator<MultiVariateRealization.Entry>
Direct Known Subclasses:
RandomWalk.Iterator
Enclosing interface:
MultiVariateRealization

public abstract static class MultiVariateRealization.Iterator
extends MultiVariateRealization.Iterator

This Iterator support lazy evaluation/generation of a realization from a stochastic process. For a given filtration, a stochastic process gives arise to a particular realization, which is a (deterministic) time series. A realization is therefore only created on demand. For example, we create a realization when an Iterator is constructed.


Field Summary
 int d
          the dimension of the Brownian motion
 
Fields inherited from class com.numericalmethod.suanshu.stats.timeseries.TimeSeries.Iterator
length, pos, ts
 
Constructor Summary
MultiVariateRealization.Iterator(MultiVariateRealization Xt, int d, long seed)
          Construct a realization of a multivariate stochastic process.
 
Method Summary
protected  Vector dB(double dt)
           
 MultiVariateRealization.Entry next()
          Get the next entry in the time series, if any.
 Vector nextValue()
          Get the next value in the time series.
abstract  double t(int pos)
          Get the current timestamp of the realization.
abstract  Vector xt(int pos)
          Get the current value of the realization.
protected  Vector Zt()
          Get a d-dimension Gaussian innovation.
 
Methods inherited from class com.numericalmethod.suanshu.stats.timeseries.TimeSeries.Iterator
hasNext, position, remove
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

d

public final int d
the dimension of the Brownian motion

Constructor Detail

MultiVariateRealization.Iterator

public MultiVariateRealization.Iterator(MultiVariateRealization Xt,
                                        int d,
                                        long seed)
Construct a realization of a multivariate stochastic process.

Parameters:
Xt - a time series
d - the dimension of the Brownian motion
seed - seeding the same seed gives arise to the same realization
Method Detail

t

public abstract double t(int pos)
Get the current timestamp of the realization.

Parameters:
pos - the index to the current Entry
Returns:
the current timestamp

xt

public abstract Vector xt(int pos)
Get the current value of the realization.

Parameters:
pos - the index to the current Entry
Returns:
the current value

next

public MultiVariateRealization.Entry next()
Description copied from class: TimeSeries.Iterator
Get the next entry in the time series, if any.

Specified by:
next in interface java.util.Iterator<MultiVariateRealization.Entry>
Specified by:
next in class TimeSeries.Iterator<MultiVariateRealization.Entry>
Returns:
the next entry

nextValue

public Vector nextValue()
Description copied from class: MultiVariateTimeSeries.Iterator
Get the next value in the time series.

Specified by:
nextValue in class MultiVariateTimeSeries.Iterator<MultiVariateRealization.Entry>
Returns:
the next value

Zt

protected Vector Zt()
Get a d-dimension Gaussian innovation.

Returns:
a Gaussian innovation

dB

protected Vector dB(double dt)

SuanShu, a Java numerical and statistical library

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