Class Variable

    • Constructor Detail

      • Variable

        public Variable()
    • Method Detail

      • calculate

        void calculate​(Source s,
                       long start,
                       long end)
        Used to calculate the needed value from a source, this method call the abstract method fill(long[], double[], long, long).
        Parameters:
        s -
        start -
        end -
      • fill

        protected abstract Variable.Value fill​(long[] timestamps,
                                               double[] values,
                                               long start,
                                               long end)
        This method is call with the needed values, extracted from the datasource to do the calculation. Value is to be filled with both the double value and a possible timestamp, when it's used to find a specific point
        Parameters:
        timestamps - the timestamps for the value
        values - the actual values
        start - the start of the period
        end - the end of the period
        Returns:
        a filled Value object