codac 2.0.0
Loading...
Searching...
No Matches
codac2_TimePropag.h
Go to the documentation of this file.
1
9
10#pragma once
11
12#include <ostream>
13
14namespace codac2
15{
22 enum class TimePropag
23 {
24 FWD = 0x01,
25 BWD = 0x02,
26 FWD_BWD = 0x01 | 0x02
27 };
28
30 { return static_cast<TimePropag>(static_cast<int>(a) & static_cast<int>(b)); }
31
32 constexpr TimePropag operator|(TimePropag a, TimePropag b)
33 { return static_cast<TimePropag>(static_cast<int>(a) | static_cast<int>(b)); }
34
42 inline std::ostream& operator<<(std::ostream& os, const TimePropag& x)
43 {
44 switch(x)
45 {
46 case TimePropag::FWD:
47 os << "[ fwd ]";
48 break;
49 case TimePropag::BWD:
50 os << "[ bwd ]";
51 break;
52 case TimePropag::FWD_BWD:
53 os << "[ fwd, bwd ]";
54 break;
55 }
56 return os;
57 }
58}
auto operator&(const MatrixBase< OtherDerived > &x) const
Returns the element-wise intersection of this matrix with another.
Definition codac2_Matrix_addons_IntervalMatrixBase.h:264
Definition codac2_OctaSym.h:21
std::ostream & operator<<(std::ostream &os, const BoolInterval &x)
Streams out a BoolInterval.
Definition codac2_BoolInterval.h:131
TimePropag
Enumeration specifying the temporal propagation way (forward or backward in time).
Definition codac2_TimePropag.h:23