|
|
|
|
||
|
DEFINITION MODULE TimeSeries; (******************************************************************* Module TimeSeries (Version 1.0) Copyright (c) 1995-2006 by Dimitrios Gyalistras and ETH Zurich. Purpose Handle REAL-vectors/matrices (e.g., time series). Remarks -- Programming o Design Dimitrios Gyalistras 13/07/1995 o Implementation Dimitrios Gyalistras 13/07/1995 ETH Zurich Systems Ecology CHN E 35.1 Universitaetstrasse 16 8092 Zurich SWITZERLAND URLs: <mailto:RAMSES@env.ethz.ch> <http://www.sysecol.ethz.ch> <http://www.sysecol.ethz.ch/SimSoftware/RAMSES> Last revision of definition: 17/07/1995 DG *******************************************************************) CONST MaxTimePoints = 4*1024; MaxTimeSeries = 128; TYPE TimeSeries = ARRAY [1..MaxTimePoints] OF REAL; TimeSeriesPtr = POINTER TO TimeSeries; TimeSeriesArr = ARRAY [1..MaxTimeSeries] OF TimeSeriesPtr; PROCEDURE AllocTS( VAR ts : TimeSeriesPtr; (* VAR for speed-up *) initVal : REAL; (* value to use for initialization *) VAR errTxt : ARRAY OF CHAR ): BOOLEAN; PROCEDURE AllocTSArr( VAR tsArr : TimeSeriesArr; nTimeSeries : INTEGER; initVal : REAL; VAR errTxt : ARRAY OF CHAR ): BOOLEAN; PROCEDURE DeallocTS( VAR ts: TimeSeriesPtr ); PROCEDURE DeallocTSArr( VAR ts: TimeSeriesArr ); PROCEDURE TSSpecifInRange( nTimeSeries : INTEGER; nElements : INTEGER; errMsgPrefix : ARRAY OF CHAR; VAR errTxt : ARRAY OF CHAR ): BOOLEAN; PROCEDURE TSNilCheck( VAR tsArr : TimeSeriesArr; (* VAR for speed-up *) nTimeSeries : INTEGER; errMsgPrefix : ARRAY OF CHAR; VAR errTxt : ARRAY OF CHAR ): BOOLEAN; PROCEDURE ReadTS( filename : ARRAY OF CHAR; initVal : REAL; VAR tsArr : TimeSeriesArr; VAR nTimeSeries : INTEGER; VAR nElements : INTEGER; VAR errTxt : ARRAY OF CHAR ): BOOLEAN; PROCEDURE WriteTimeSeries( filename : ARRAY OF CHAR; VAR tsArr : TimeSeriesArr; nTimeSeries : INTEGER; nElements : INTEGER; VAR errTxt : ARRAY OF CHAR ): BOOLEAN; END TimeSeries.
|
||
|
|
|