SuanShu, a Java numerical and statistical library

com.numericalmethod.suanshu.stats.stochasticprocess.univariate
Class Realization.Iterator

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

public abstract static class Realization.Iterator
extends Realization.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
 
Fields inherited from class com.numericalmethod.suanshu.stats.timeseries.TimeSeries.Iterator
length, pos, ts
 
Constructor Summary
Realization.Iterator(Realization xt, long seed)
          Construct a realization of a univariate stochastic process.
 
Method Summary
protected  double dB(double dt)
           
 Realization.Entry next()
          Get the next entry in the time series, if any.
 double nextValue()
          Get the next value in the time series.
abstract  double t(int pos)
          Get the current timestamp of the realization.
abstract  double xt(int pos)
          Get the current value of the realization.
protected  double Zt()
          Get a 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
 

Constructor Detail

Realization.Iterator

public Realization.Iterator(Realization xt,
                            long seed)
Construct a realization of a univariate stochastic process.

Parameters:
xt - a time series
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 double xt(int pos)
Get the current value of the realization.

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

next

public Realization.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<Realization.Entry>
Specified by:
next in class TimeSeries.Iterator<Realization.Entry>
Returns:
the next entry

nextValue

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

Specified by:
nextValue in class TimeSeries.Iterator<Realization.Entry>
Returns:
the next value

Zt

protected double Zt()
Get a Gaussian innovation.

Returns:
a Gaussian innovation

dB

protected double dB(double dt)

SuanShu, a Java numerical and statistical library

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