Skip to content

Commit 16286a6

Browse files
committed
TimeVariance text added
1 parent 2c09394 commit 16286a6

1 file changed

Lines changed: 23 additions & 0 deletions

File tree

docs/manual.adoc

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -730,3 +730,26 @@ i=1
730730

731731

732732
stdDev() returns the standard deviation of the samples, which is the square root of the variance.
733+
734+
=== TimeVariance
735+
736+
The TimeVariance class makes it possible to determine how long, in terms of simulation time, specific values were maintained. In effect, values are weighted according to the length of time that they were held, whereas with the Variance class only the specific values are taken into account.
737+
738+
----
739+
public class TimeVariance extends Variance
740+
{
741+
public void reset ();
742+
743+
public void setValue (double value) throws IllegalArgumentException;
744+
745+
public double timeAverage ();
746+
747+
public boolean saveState (String fileName) throws IOException;
748+
public boolean saveState (DataOutputStream oFile) throws IOException;
749+
750+
public boolean restoreState (String fileName) throws FileNotFoundException, IOException;
751+
public boolean restoreState (DataInputStream iFile) throws IOException;
752+
};
753+
----
754+
755+
Whenever a value is supplied to an instance of the TimeVariance class the simulation time at which it occurred is also noted. If a value changes, or the timeAverage() method is invoked, then the time it has been maintained for is calculated and the statistical data is updated.

0 commit comments

Comments
 (0)