24 template <
typename RealType>
54 if (real == preceding.
real)
59 bool operator<(const SuperDenseTime<RealType>& other)
const 61 return (real < other.real) ||
62 ((real == other.real) && (logical < other.logical));
65 bool operator<=(const SuperDenseTime<RealType>& other)
const 67 return (real < other.real) ||
68 ((real == other.real) && (logical <= other.logical));
73 return (real == other.
real && logical == other.
logical);
90 std::numeric_limits<int>::max(),
91 std::numeric_limits<int>::max());
96 std::numeric_limits<long>::max(),
97 std::numeric_limits<int>::max());
101 std::numeric_limits<double>::infinity(),
102 std::numeric_limits<int>::max());
105 return std::numeric_limits<int>::max();
SuperDenseTime(RealType real, int logical)
Constructor assigns initial values to real and logical.
Definition: adevs_time.h:35
This is the default super dense simulation time.
Definition: adevs_time.h:25
RealType real
The real, physically meaningful part of time.
Definition: adevs_time.h:29
T adevs_zero()
Returns the zero value for a time type.
Definition: adevs_time.h:114
T adevs_inf()
Returns the maximum value for a time type.
Definition: adevs_time.h:88
int logical
The logical part of time for order at a real instant.
Definition: adevs_time.h:31
SuperDenseTime< RealType > operator+(const SuperDenseTime< RealType > &h) const
Advance the time by h.
Definition: adevs_time.h:43
Definition: adevs_base.h:21
T adevs_epsilon()
Returns the smallest increment of time.
Definition: adevs_time.h:130
SuperDenseTime()
Default constructor.
Definition: adevs_time.h:33
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 ...
Definition: adevs_time.h:52
bool operator==(const SuperDenseTime< RealType > &other) const
Times are identical.
Definition: adevs_time.h:71