

DEFINITION MODULE STAT;

TYPE
   Block;


   BlockType = (Tally, Accumulate);


PROCEDURE Create
   ( VAR X : Block;
     Kind  : BlockType;
     Name  : ARRAY OF CHAR
   );


PROCEDURE Init
   ( X : Block
   );


PROCEDURE Update
   ( X : Block;
     V : LONGREAL
   );


PROCEDURE Report
   ( X : Block
   );


PROCEDURE NumberObs
   ( X : Block                  (* Bloc statistique de type Tally. *)
   ): LONGCARD ;


PROCEDURE Minimum
   ( X : Block
   ): LONGREAL;


PROCEDURE Maximum
   ( X : Block
   ): LONGREAL;


PROCEDURE Sum
   ( X : Block
   ): LONGREAL;


PROCEDURE Average
   ( X : Block
   ): LONGREAL;


PROCEDURE Variance
   ( X : Block                  (* Bloc statistique de type Tally. *)
   ): LONGREAL;


PROCEDURE StandardDev
   ( X : Block                  (* Bloc statistique de type Tally. *)
   ): LONGREAL;


PROCEDURE ConfidenceInterval
   ( X      : Block;            (* Bloc statistique de type Tally.   *)
     Level  : LONGREAL;             (* Niveau de confiance.              *)
     VAR Center, Radius : LONGREAL  (* Milieu et rayon de l'intervalle.  *)
   );


PROCEDURE ReportConfidenceInterval
   ( X      : Block;            (* Bloc statistique de type Tally.   *)
     Level  : LONGREAL              (* Niveau de confiance.              *)
   );


PROCEDURE Delete
   ( VAR X : Block
   );


END STAT.
