at.borkowski.scovillej.impl.series

Class NumberSeriesImpl<T extends Number>

    • Field Detail

      • count

        protected long count
    • Constructor Detail

    • Method Detail

      • getValueClass

        public Class<T> getValueClass()
        Description copied from interface: SeriesProvider
        Returns the runtime class type for T
        Returns:
        the class object for T
      • initialize

        public void initialize(Simulation sim)
        Description copied from interface: SeriesProvider
        Initializes the series provider. This method is guaranteed to be called before any methods of Series or SeriesResult.
        Parameters:
        sim - The simulation this series is to be performed at
      • getAll

        public Map<Long,T> getAll()
        Description copied from interface: SeriesResult
        Returns all measured values as a map from the tick to the value.
        Returns:
        all measured values
      • getAveraged

        public Map<Long,Double> getAveraged(long classWidth)
        Description copied from interface: SeriesResult
        Returns an averaged version of all values. The measured values are averaged into classes with a width of classWidth. The returned map contains all averaged results as a map from the tick (the beginning, "left border" of the class) to the average value.
        Parameters:
        classWidth - the width in ticks for the classes
        Returns:
        the resulting map
      • calcNativeMedian

        protected abstract T calcNativeMedian(T a,                                      T b)
        Abstract method which must be implemented by sub-classes. The method must calculate the median, with two values given. If this method is called, it is guaranteed that there are two median candidates and the implementation is responsible of calculating the actual median. Note that in general, mean-like calculation should be performed.
        Parameters:
        a - the first (left) median candidate
        b - the second (right) median candidate
        Returns:
        the median
      • measure

        public void measure(T value)
        Description copied from interface: Series
        Adds a measured value to the series. The value is added using the current tick.
        Parameters:
        value - the value to add
      • getAverage

        public Double getAverage()
        Description copied from interface: SeriesResult
        Returns an average (arithmetic mean) of all measured values.
        Returns:
        the average
      • hasSingleMedian

        public boolean hasSingleMedian()
        Description copied from interface: SeriesResult
        Determines whether the series has one median (because it has an odd number of values, or because it is even and two median candidates are equal).
        Returns:
        whether the series has one median
      • medianA

        protected T medianA()
      • medianB

        protected T medianB()
      • getDoubleMedian

        public Double getDoubleMedian()
        Description copied from interface: SeriesResult
        Returns the median of all measured values. This method always returns a Double, even if the measured values are integer and one median is present. For a more exact version, see SeriesResult.getNativeMedian(). If there are two median values (because the number of measurements is even), the arithmetic mean of the two values is returned.
        Returns:
        the median
      • getStandardDeviation

        public Double getStandardDeviation()
        Description copied from interface: SeriesResult
        Returns the standard deviation of all measured values.
        Returns:
        the standard deviation
      • getCount

        public long getCount()
        Description copied from interface: SeriesResult
        Returns the number of measured values.
        Returns:
        the number of measured values
      • getMin

        public T getMin()
        Description copied from interface: SeriesResult
        Returns the minimum value of all measured values.
        Returns:
        the minimum value
      • getMax

        public T getMax()
        Description copied from interface: SeriesResult
        Returns the maximum value of all measured values.
        Returns:
        the maximum value
      • getNativeMedians

        public T[] getNativeMedians()
        Description copied from interface: SeriesResult
        Returns the median candidates of all measured values.
        Returns:
        the native median candidates
      • getNativeMedian

        public T getNativeMedian()
        Description copied from interface: SeriesResult
        Returns the median of all measured values. In contrast to SeriesResult.getDoubleMedian(), this method returns an exact median if there is one median. If there are two median values, the returned value depends on the implemented measurement series, but will be performed in a mean-like way (possible rounded towards some integer value).
        Returns:
        the median in native type
      • getKnownSeriesClasses

        public static Collection<Class<?>> getKnownSeriesClasses()
        Returns a list of all known series classes.
        Returns:
        all known series classes
      • createIfKnown

        public static <T> SeriesProvider<T> createIfKnown(Class<T> clazz)
        Creates a SeriesProvider for a built-in series type. Returns null if the provided type is not built-in.
        Type Parameters:
        T - the (static) type of series to create
        Parameters:
        clazz - the (runtime) type of series to create
        Returns:
        the series provider
      • formatMetrics

        protected Formatter formatMetrics(Formatter f)
        Description copied from class: SeriesImpl
        Formats metrics for this class using the supplied formatter. Sub-classes should override this method to provide detailed string representations of the metrics (min, max, average, etc.)
        Overrides:
        formatMetrics in class SeriesImpl<T extends Number>
        Parameters:
        f - the formatter to use
        Returns:
        the formatter itself (the supplied parameter formatter)

Copyright © 2015. All rights reserved.



NOTHING
NOTHING
Add the Maven Dependecy to your project: maven dependecy for com.amazonaws : aws-java-sdk : 1.3.14