codac  1.5.7
codac_Set.h
Go to the documentation of this file.
1 
12 #ifndef __CODAC_SET_H__
13 #define __CODAC_SET_H__
14 
15 #include "codac_IntervalVector.h"
16 
17 namespace codac
18 {
26  enum class SetValue
27  {
28  DEFAULT = 0x00,
29 
30  UNKNOWN = 0x01,
31  OUT = 0x02,
32  IN = 0x04,
33  PENUMBRA = 0x08
34  };
35 
45  inline int operator&(SetValue a, SetValue b)
46  { return static_cast<int>(static_cast<int>(a) & static_cast<int>(b)); }
47 
58  { return static_cast<SetValue>(static_cast<int>(a) | static_cast<int>(b)); }
59 
66  class Set
67  {
68  public:
69 
76  Set(const IntervalVector& box, SetValue value = SetValue::UNKNOWN);
77 
81  ~Set();
82 
88  SetValue value() const;
89 
95  int size() const;
96 
102  const IntervalVector& box() const;
103 
110 
111  protected:
112 
114  IntervalVector m_box;
115  };
116 }
117 
118 #endif
Multi-dimensional interval-based representation of a set.
Definition: codac_Set.h:67
const IntervalVector & box() const
Returns the n-dimensional box representing this set.
SetValue value() const
Returns the value of this set.
void set_value(SetValue value)
Sets the integer value for this set.
IntervalVector m_box
box representing this set
Definition: codac_Set.h:114
~Set()
Set destructor.
SetValue m_value
integer value of this set
Definition: codac_Set.h:113
Set(const IntervalVector &box, SetValue value=SetValue::UNKNOWN)
Creates a set.
int size() const
Returns the dimension of the paving.
FixPoint of a separator The fixpoint of a separator is computed by calling the "::"separate function ...
Definition: codac_capd_helpers.h:9
const IntervalMatrix operator&(const IntervalMatrix &x, const IntervalMatrix &y)
SetValue
Defines a set of feasible values of a set.
Definition: codac_Set.h:27
@ PENUMBRA
inside the penumbra set
@ DEFAULT
does not have a meaning, only used for default values of arguments
@ UNKNOWN
unable to conclude
@ IN
inside the solution set
@ OUT
outside the solution set
const IntervalMatrix operator|(const IntervalMatrix &x, const IntervalMatrix &y)