Class GenericTimeTimeSeries<T extends Comparable<? super T>>

    • Constructor Detail

      • GenericTimeTimeSeries

        public GenericTimeTimeSeries​(T[] timestamps,
                                     double[] values)
        Construct a univariate time series from timestamps and values.
        Parameters:
        timestamps - the timestamps
        values - the values
    • Method Detail

      • get

        public double get​(int i)
        Get the i-th value.
        Parameters:
        i - the position index
        Returns:
        the i-th value
      • get

        public double get​(T t)
        Get the value at time t.
        Parameters:
        t - a timestamp
        Returns:
        the value at time t
      • time

        public T time​(int index)
        Get the i-th time.
        Parameters:
        index - the position index
        Returns:
        the i-th timestamp
      • timestamps

        public T[] timestamps()
        Get all the timestamps.
        Returns:
        the timestamps
      • drop

        public GenericTimeTimeSeries<T> drop​(int nItems)
        Construct an instance of GenericTimeTimeSeries by dropping the leading nItems entries.
        Parameters:
        nItems - the number of leading entries to be dropped
        Returns:
        a GenericTimeTimeSeries
      • diff

        public GenericTimeTimeSeries<T> diff​(int d)
        Construct an instance of GenericTimeTimeSeries by taking the first difference d times.
        Parameters:
        d - the number of differences
        Returns:
        diff(x, lag = 1, differences = d) as in DoubleUtils
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object