TeDDy 4.1.0
Decision diagram library.
Loading...
Searching...
No Matches
dplds.hpp
1#ifndef LIBTEDDY_DETAILS_DPLDS_HPP
2#define LIBTEDDY_DETAILS_DPLDS_HPP
3
4#include <libteddy/details/types.hpp>
5
6namespace teddy::dpld
7{
11inline static auto constexpr basic = [] (int32 const fFrom, int32 const fTo)
12{
13 return [=] (int32 const lhs, int32 const rhs)
14 { return lhs == fFrom && rhs == fTo; };
15};
16
20inline static auto constexpr type_1_decrease = [] (int32 const state)
21{
22 return [state] (int32 const lhs, int32 const rhs)
23 { return lhs == state && rhs < state; };
24};
25
29inline static auto constexpr type_1_increase = [] (int32 const state)
30{
31 return [state] (int32 const lhs, int32 const rhs)
32 { return lhs == state && rhs > state; };
33};
34
38inline static auto constexpr type_2_decrease = [] ()
39{ return [] (int32 const lhs, int32 const rhs) { return lhs > rhs; }; };
40
44inline static auto constexpr type_2_increase = [] ()
45{ return [] (int32 const lhs, int32 const rhs) { return lhs < rhs; }; };
46
50inline static auto constexpr type_3_decrease = [] (int32 const state)
51{
52 return [state] (int32 const lhs, int32 const rhs)
53 { return lhs >= state && rhs < state; };
54};
55
59inline static auto constexpr type_3_increase = [] (int32 const state)
60{
61 return [state] (int32 const lhs, int32 const rhs)
62 { return lhs < state && rhs >= state; };
63};
64} // namespace teddy::dpld
65
66#endif