001 package org.expasy.jpl.commons.collection.stat;
002
003
004 import java.util.List;
005
006
007 /**
008 * The {@code StatisticalSerie} interface should be implemented by any
009 * 1-Dimension statistical serie concerning samples with one measured variable.
010 *
011 * @author nikitin
012 *
013 * @param <T> the data type.
014 *
015 * @version 1.0
016 *
017 */
018 public interface StatisticalSerie<T extends Number> {
019
020 /** @return the number of observations */
021 int getSampleSize();
022
023 /** load values in the statistical serie */
024 void loadSerie(List<? extends Number> values);
025
026 /** load a value in the statistical serie */
027 void loadDataInSerie(Number value);
028
029 /** @return all the values of the sample */
030 List<? extends Number> getSampleValues();
031
032 /** @return all the values */
033 List<T> getValues();
034
035 /** @return the frequency of the value */
036 int getFrequency(T value);
037
038 /** @return the relative frequency of the value */
039 double getRelativeFrequency(T value);
040 }