SuanShu, a Java numerical and statistical library

com.numericalmethod.suanshu.stats.timeseries.univariate.realtime
Class OneDimensionTimeSeries<T>

java.lang.Object
  extended by com.numericalmethod.suanshu.stats.timeseries.univariate.realtime.OneDimensionTimeSeries<T>
All Implemented Interfaces:
TimeSeries<T,java.lang.Double>

public class OneDimensionTimeSeries<T>
extends java.lang.Object
implements TimeSeries<T>

This class creates a univariate realization from a multivariate realization by taking one of its dimension (coordinate).


Nested Class Summary
static class OneDimensionTimeSeries.Entry<T>
           
static class OneDimensionTimeSeries.Iterator<T>
          the Iterator to read a OneDimensionTimeSeries
 
Constructor Summary
OneDimensionTimeSeries(MultiVariateTimeSeries<T> mts, int dim)
          Construct a univariate realization from a multivariate realization by taking one of its dimension (coordinate).
 
Method Summary
 OneDimensionTimeSeries.Iterator<T> iterator()
          Get an Iterator to read this univariate time series.
 int size()
          the length of the time series
 double[] toArray()
          Convert this time series into an array.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OneDimensionTimeSeries

public OneDimensionTimeSeries(MultiVariateTimeSeries<T> mts,
                              int dim)
Construct a univariate realization from a multivariate realization by taking one of its dimension (coordinate).

Parameters:
mts - a multivariate realization
dim - the dimension/coordinate to extract
Method Detail

iterator

public OneDimensionTimeSeries.Iterator<T> iterator()
Description copied from interface: TimeSeries
Get an Iterator to read this univariate time series.

Specified by:
iterator in interface TimeSeries<T,java.lang.Double>
Returns:
an iterator

toArray

public double[] toArray()
Description copied from interface: TimeSeries
Convert this time series into an array.

Returns:
the array representation of the time series

size

public int size()
Description copied from interface: TimeSeries
the length of the time series

Specified by:
size in interface TimeSeries<T,java.lang.Double>
Returns:
the size

SuanShu, a Java numerical and statistical library

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