Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

AMOS::Distribution_t Struct Reference

A set of statistics that define a distribution. More...

#include <datatypes_AMOS.hh>

Inheritance diagram for AMOS::Distribution_t:

Inheritance graph
[legend]
Collaboration diagram for AMOS::Distribution_t:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 Distribution_t ()
 Constructs an empty Distribution_t object.
 ~Distribution_t ()
 Destroys a Distribution_t object.
void clear ()
 Clears all object data, reinitializes the object.
virtual NCode_t getNCode () const
 Get the AMOS NCode type identifier.
virtual void readMessage (const Message_t &msg)
 Reads in data from a Message object.
void readRecord (std::istream &in)
 Read a binary record.
virtual void writeMessage (Message_t &msg) const
 Writes data to a Message object.
void writeRecord (std::ostream &out) const
 Write a binary record.

Public Attributes

Pos_t mean
 the mean
SD_t sd
 the standard deviation

Static Public Attributes

const NCode_t NCODE = M_DISTRIBUTION
 The NCode type identifier for this object.

Detailed Description

A set of statistics that define a distribution.

Additional parameters may be added to this class if more complex distributions need to be represented. The contained parameters should suffice to represent normal distributions.

Todo:
make more general for more complex distributions

Definition at line 37 of file datatypes_AMOS.hh.


Constructor & Destructor Documentation

AMOS::Distribution_t::Distribution_t  )  [inline]
 

Constructs an empty Distribution_t object.

Sets all members to 0 Definition at line 53 of file datatypes_AMOS.hh.

References clear().

AMOS::Distribution_t::~Distribution_t  )  [inline]
 

Destroys a Distribution_t object.

Definition at line 62 of file datatypes_AMOS.hh.


Member Function Documentation

void AMOS::Distribution_t::clear  )  [inline]
 

Clears all object data, reinitializes the object.

Definition at line 71 of file datatypes_AMOS.hh.

References mean, and sd.

Referenced by Distribution_t(), readMessage(), and writeMessage().

virtual NCode_t AMOS::Distribution_t::getNCode  )  const [inline, virtual]
 

Get the AMOS NCode type identifier.

Returns:
The AMOS NCode type identifier

Implements AMOS::IMessagable_t.

Definition at line 78 of file datatypes_AMOS.hh.

References AMOS::NCode_t.

void Distribution_t::readMessage const Message_t msg  )  [virtual]
 

Reads in data from a Message object.

Reads the data contained in a Message object and stores it in the Messagable object. Will not complain if incoming message is of the wrong type, will only try and suck out the fields it recognizes. All previous data in the Messagable object will be cleared or overwritten.

Parameters:
msg The Message to read from
Precondition:
The expected fields are formatted properly
Exceptions:
ArgumentException_t 
Returns:
void

Implements AMOS::IMessagable_t.

Definition at line 23 of file datatypes_AMOS.cc.

References AMOS_THROW_ARGUMENT, clear(), AMOS::F_MEAN, AMOS::F_SD, mean, and sd.

void Distribution_t::readRecord std::istream &  in  ) 
 

Read a binary record.

Definition at line 51 of file datatypes_AMOS.cc.

References mean, AMOS::readLE(), and sd.

void Distribution_t::writeMessage Message_t msg  )  const [virtual]
 

Writes data to a Message object.

Writes the data contained in a Messagable object to a Message object. All previous data in the Message will be cleared or overwritten.

Parameters:
msg The Message to write to
Returns:
void

Implements AMOS::IMessagable_t.

Definition at line 59 of file datatypes_AMOS.cc.

References clear(), AMOS::F_MEAN, AMOS::F_SD, mean, AMOS::NULL_STRING, and sd.

void Distribution_t::writeRecord std::ostream &  out  )  const
 

Write a binary record.

Definition at line 91 of file datatypes_AMOS.cc.

References mean, sd, and AMOS::writeLE().


Member Data Documentation

Pos_t AMOS::Distribution_t::mean
 

the mean

Definition at line 40 of file datatypes_AMOS.hh.

Referenced by clear(), readMessage(), readRecord(), writeMessage(), and writeRecord().

const NCode_t Distribution_t::NCODE = M_DISTRIBUTION [static]
 

The NCode type identifier for this object.

Definition at line 19 of file datatypes_AMOS.cc.

SD_t AMOS::Distribution_t::sd
 

the standard deviation

Definition at line 41 of file datatypes_AMOS.hh.

Referenced by clear(), readMessage(), readRecord(), writeMessage(), and writeRecord().


The documentation for this struct was generated from the following files:
Generated on Tue May 17 15:19:43 2005 for libAMOS by doxygen 1.3.8