adevs
|
This is the default super dense simulation time. More...
#include <adevs_time.h>
Public Member Functions | |
SuperDenseTime () | |
Default constructor. | |
SuperDenseTime (RealType real, int logical) | |
Constructor assigns initial values to real and logical. | |
SuperDenseTime< RealType > | operator+ (const SuperDenseTime< RealType > &h) const |
Advance the time by h. More... | |
SuperDenseTime< RealType > | operator- (const SuperDenseTime< RealType > &preceding) const |
Get the length of the interval from preceding to this. The format for the call is big number - small number. | |
bool | operator< (const SuperDenseTime< RealType > &other) const |
Order is lexicographical favoring real then logical. | |
bool | operator<= (const SuperDenseTime< RealType > &other) const |
Order is lexicographical favoring real then logical. | |
bool | operator== (const SuperDenseTime< RealType > &other) const |
Times are identical. | |
Public Attributes | |
RealType | real |
The real, physically meaningful part of time. | |
int | logical |
The logical part of time for order at a real instant. | |
This is the default super dense simulation time.
See the main page for a description of how the comparison, addition, and subtraction (length) operations work. This demonstrates the minumum requires for a type that is used as time. The type Time is an alias for SuperDenseTime<int>.
|
inline |
Advance the time by h.
Result is (real,logical)+(hreal,hlogical) = if hreal > 0 then (real+hreal,hlogical) else (real,logical+hlogical). The pair (real,logical) is this object and (hreal,hlogical) is the object h.
References adevs::SuperDenseTime< RealType >::logical, and adevs::SuperDenseTime< RealType >::real.