Class EventBasedWeightedTally

    • Constructor Detail

      • EventBasedWeightedTally

        public EventBasedWeightedTally​(String description)
        Construct a new WeightedTally with a description.
        Parameters:
        description - String; the description of this WeightedTally
    • Method Detail

      • getMax

        public final double getMax()
        Returns the max.
        Specified by:
        getMax in interface BasicTallyInterface
        Returns:
        double
      • getMin

        public final double getMin()
        Returns the min.
        Specified by:
        getMin in interface BasicTallyInterface
        Returns:
        double
      • getN

        public final long getN()
        Returns the number of observations.
        Specified by:
        getN in interface BasicTallyInterface
        Returns:
        long n
      • getWeightedSampleMean

        public final double getWeightedSampleMean()
        Retrieve the current weighted sample mean of all observations since the initialization.
        Specified by:
        getWeightedSampleMean in interface WeightedTallyInterface
        Returns:
        double; the current weighted sample mean
      • getWeightedSampleStDev

        public final double getWeightedSampleStDev()
        Retrieve the current weighted sample standard deviation of the observations.
        Specified by:
        getWeightedSampleStDev in interface WeightedTallyInterface
        Returns:
        double; the current weighted sample standard deviation
      • getWeightedPopulationStDev

        public final double getWeightedPopulationStDev()
        Retrieve the current weighted standard deviation of the observations.
        Specified by:
        getWeightedPopulationStDev in interface WeightedTallyInterface
        Returns:
        double; the current weighted standard deviation
      • getWeightedSampleVariance

        public final double getWeightedSampleVariance()
        Retrieve the current weighted sample variance of the observations.
        Specified by:
        getWeightedSampleVariance in interface WeightedTallyInterface
        Returns:
        double; the current weighted sample variance of the observations
      • getWeightedPopulationVariance

        public final double getWeightedPopulationVariance()
        Retrieve the current weighted variance of the observations.
        Specified by:
        getWeightedPopulationVariance in interface WeightedTallyInterface
        Returns:
        double; the current weighted variance of the observations
      • getWeightedSum

        public final double getWeightedSum()
        Retrieve the current weighted sum of the values of the observations.
        Specified by:
        getWeightedSum in interface WeightedTallyInterface
        Returns:
        double; the current weighted sum of the values of the observations
      • initialize

        public void initialize()
        initializes the Tally. This methods sets the max, min, n, sum and variance values to their initial values.
        Specified by:
        initialize in interface BasicTallyInterface
      • ingest

        public double ingest​(double weight,
                             double value)
        Process one observed weighted value.
        Parameters:
        weight - double; the weight of the value to process
        value - double; the value to process
        Returns:
        double; the value
      • fireEvents

        protected void fireEvents()
        Method that can be overridden to fire own events or additional events when ingesting an observation.