Classes | Functions
Time.hpp File Reference

Defines Time and TimeDelta. More...

#include <cstddef>
#include <functional>
#include <iosfwd>
#include <limits>
#include <utility>
#include "ErrorHandling/Assert.hpp"
#include "Time/Slab.hpp"
#include "Utilities/Rational.hpp"

Go to the source code of this file.


class  Time
 The time in a simulation. Times can be safely compared for exact equality as long as they do not belong to overlapping unequal slabs. More...
struct  Time::StructuralCompare
 A comparison operator that compares Times structurally, i.e., just looking at the class members. This is only intended for use as the comparator in a map. The returned ordering does not match the time ordering and opposite sides of slab boundaries do not compare equal. It is, however, much faster to compute than the temporal ordering, so it is useful when an ordering is required, but the ordering does not have to be physically meaningful. More...
class  TimeDelta
 Represents an interval of time within a single slab. More...


bool operator== (const Time &a, const Time &b) noexcept
bool operator!= (const Time &a, const Time &b) noexcept
bool operator< (const Time &a, const Time &b) noexcept
bool operator> (const Time &a, const Time &b) noexcept
bool operator<= (const Time &a, const Time &b) noexcept
bool operator>= (const Time &a, const Time &b) noexcept
bool operator== (const TimeDelta &a, const TimeDelta &b) noexcept
bool operator!= (const TimeDelta &a, const TimeDelta &b) noexcept
bool operator< (const TimeDelta &a, const TimeDelta &b) noexcept
bool operator> (const TimeDelta &a, const TimeDelta &b) noexcept
bool operator<= (const TimeDelta &a, const TimeDelta &b) noexcept
bool operator>= (const TimeDelta &a, const TimeDelta &b) noexcept
TimeDelta operator- (const Time &a, const Time &b) noexcept
Time operator+ (Time a, const TimeDelta &b) noexcept
Time operator+ (const TimeDelta &a, Time b) noexcept
Time operator- (Time a, const TimeDelta &b) noexcept
TimeDelta operator+ (TimeDelta a, const TimeDelta &b) noexcept
TimeDelta operator- (TimeDelta a, const TimeDelta &b) noexcept
double operator/ (const TimeDelta &a, const TimeDelta &b) noexcept
TimeDelta operator* (TimeDelta a, const TimeDelta::rational_t &b) noexcept
TimeDelta operator* (const TimeDelta::rational_t &a, TimeDelta b) noexcept
TimeDelta operator/ (TimeDelta a, const TimeDelta::rational_t &b) noexcept
TimeDelta abs (TimeDelta t) noexcept
std::ostreamoperator<< (std::ostream &os, const Time &t) noexcept
std::ostreamoperator<< (std::ostream &os, const TimeDelta &dt) noexcept
size_t hash_value (const Time &t) noexcept

Detailed Description

Defines Time and TimeDelta.