View Javadoc
1   package org.djutils.stats.summarizers;
2   
3   /**
4    * The WeightedTally interface defines the methods that a time-weighted tally should implement.
5    * <p>
6    * Copyright (c) 2002-2020 Delft University of Technology, Jaffalaan 5, 2628 BX Delft, the Netherlands. All rights reserved. See
7    * for project information <a href="https://simulation.tudelft.nl/" target="_blank"> https://simulation.tudelft.nl</a>. The DSOL
8    * project is distributed under a three-clause BSD-style license, which can be found at
9    * <a href="https://simulation.tudelft.nl/dsol/3.0/license.html" target="_blank">
10   * https://simulation.tudelft.nl/dsol/3.0/license.html</a>.
11   * <br>
12   * @author <a href="https://www.tudelft.nl/averbraeck" target="_blank"> Alexander Verbraeck</a>
13   * @author <a href="https://www.tudelft.nl/staff/p.knoppers/">Peter Knoppers</a>
14   */
15  public interface WeightedTallyInterface extends BasicTallyInterface
16  {
17      /**
18       * Retrieve the current weighted sample mean of all observations since the initialization.
19       * @return double; the current weighted sample mean
20       */
21      double getWeightedSampleMean();
22  
23      /**
24       * Retrieve the current weighted mean of all observations since the initialization.
25       * @return double; the current weighted mean
26       */
27      default double getWeightedPopulationMean()
28      {
29          return getWeightedSampleMean();
30      }
31  
32      /**
33       * Retrieve the current weighted sample standard deviation of the observations.
34       * @return double; the current weighted sample standard deviation
35       */
36      double getWeightedSampleStDev();
37  
38      /**
39       * Retrieve the current weighted standard deviation of the observations.
40       * @return double; the current weighted standard deviation
41       */
42      double getWeightedPopulationStDev();
43  
44      /**
45       * Retrieve the current weighted sample variance of the observations.
46       * @return double; the current weighted sample variance of the observations
47       */
48      double getWeightedSampleVariance();
49  
50      /**
51       * Retrieve the current weighted variance of the observations.
52       * @return double; the current weighted variance of the observations
53       */
54      double getWeightedPopulationVariance();
55  
56      /**
57       * Retrieve the current weighted sum of the values of the observations.
58       * @return double; the current weighted sum of the values of the observations
59       */
60      double getWeightedSum();
61  
62  }