#include <Real.h>
Inheritance diagram for Real:

Public Methods | |
| Real (float mean=0.0, float sigma=0.0) | |
| Create a new real with the specified distribution. | |
| void | set (float mean, float sigma) |
| Set the distribution paramaters. | |
| void | regen () |
| Choose a new value from the distribution. | |
| float | getMean () const |
| Get the mean value of the distribution. | |
| float | getSigma () const |
| Get the standard deviation of the distribution. | |
| float | getValue () const |
| Get the actual value. | |
| virtual std::string | asString () const |
| Standard representation string. | |
| virtual std::string | typeString () const |
| Return a string representation of the type. | |
| operator float () const | |
| Allow implicit coersion to a floating point value. | |
| virtual void | serialize (Archive &) |
| Serialize to or from a data archive. | |
| virtual void | parseXML (const char *cdata) |
| Internal method used by the XML parser. | |
| virtual void | convertXML () |
| Convert XML data to internal format prior to serialization. | |
This class represents a "real-world" value distributed according to a normal distribution. Reals are specified by a median value and a standard deviation. When constructed the actual value is generated from this distribution.
|
||||||||||||
|
Create a new real with the specified distribution.
|
|
|
Standard representation string.
Implements BaseType. |
|
|
Convert XML data to internal format prior to serialization. This method is currently only called by the XML parser for Object classes. If another BaseType class requires this method, a call must be added to the appropriate XML handler in the parser. |
|
|
Get the mean value of the distribution.
|
|
|
Get the standard deviation of the distribution.
|
|
|
Get the actual value.
|
|
|
Allow implicit coersion to a floating point value.
|
|
|
Internal method used by the XML parser. The format for Reals is "mean:sigma" Reimplemented from BaseType. |
|
|
Choose a new value from the distribution.
|
|
|
Serialize to or from a data archive. Only the distribution parameters (mean and sigma) are saved. A new value will be generated from the saved distribution. Reimplemented from BaseType. |
|
||||||||||||
|
Set the distribution paramaters.
|
|
|
Return a string representation of the type.
Implements BaseType. |
|
SimData version pre-0.4.0. For more information on SimData, visit the SimData Homepage. Generated on Tue Oct 14 12:06:42 2003, using Doxygen 1.2.18. |