Class WelchDataArrayCollector

    • Constructor Detail

      • WelchDataArrayCollector

        public WelchDataArrayCollector​(int maxNumObs,
                                       int maxNumReps,
                                       StatisticType statisticType,
                                       java.lang.String name,
                                       double batchSize)
    • Method Detail

      • clearData

        public final void clearData()
        Sets all the data to Double.NaN
      • getWelchAverages

        public final double[] getWelchAverages()
        Welch average is across each replication for each observation
        Returns:
        an array of the Welch averages
      • getWelchCumulativeAverages

        public final double[] getWelchCumulativeAverages()
        Gets an array that contains the cumulative average over the Welch Averages
        Returns:
        returns an array that contains the cumulative average
      • getData

        public final double[][] getData()
        Columns are the replications, rows are the data
        Returns:
        a copy of the data
      • getReplicationData

        public final double[] getReplicationData​(int repNum)
        Parameters:
        repNum - the replication number 1, 2, etc
        Returns:
        the within replication data for the indicated replication
      • getMinNumberOfRowsAcrossReplications

        public final int getMinNumberOfRowsAcrossReplications()
        If no replications have been completed this returns 0
        Returns:
        the minimum number of observations (rows) across all the collected replications
      • writeCSVWelchData

        public final void writeCSVWelchData​(java.io.PrintWriter out)
        Writes out the number of observations to the supplied PrintWriter This results in a comma separated value file that has each rows containing each observation for each replication and each replication as columns. The last two columns are avg is the average across the replications and cumAvg. The file is flushed and closed. The header row is: Rep1, Rep2, ..., RepN, Avg, CumAvg
        Parameters:
        out - the PrintWriter
      • writeCSVWelchPlotData

        public final void writeCSVWelchPlotData​(java.io.PrintWriter out)
        Writes out all of the observations to the supplied PrintWriter This results in a comma separated value file that has two columns: Avg, CumAvg containing each Welch plot data point for all of the observations. The file is flushed and closed.
        Parameters:
        out - the PrintWriter
      • collect

        public void collect​(double time,
                            double value)
        Parameters:
        time - the time that the observation occurred
        value - the value of the observation at the observed time
      • cleanUpCollector

        public void cleanUpCollector()
        Description copied from interface: WelchDataCollectorIfc
        Should be executed once after all replications have been observed