irafhy
Interval arithmetic based Reachability Analysis Framework for Hybrid Automaton
constraint.h
Go to the documentation of this file.
1 #ifndef REPRESENTATION_FORMAL_BASIC_CONSTRAINT_H
2 #define REPRESENTATION_FORMAL_BASIC_CONSTRAINT_H
3 
6 
7 namespace irafhy
8 {
9  class Constraint
10  {
11  private:
24 
25  public:
29  Constraint() = default;
36  Constraint(const Item& lhsExpression, const Item& rhsExpression, RELATION relation);
40  ~Constraint() = default;
48  [[nodiscard]] bool isSatisfy(const capd::interval& t,
49  const std::vector<capd::interval>& in,
50  const std::vector<capd::interval>& params) const;
58  capd::interval lhsValue(const capd::interval& t,
59  const std::vector<capd::interval>& in,
60  const std::vector<capd::interval>& params) const;
68  capd::interval rhsValue(const capd::interval& t,
69  const std::vector<capd::interval>& in,
70  const std::vector<capd::interval>& params) const;
75  [[nodiscard]] RELATION relation() const;
82  friend std::ostream& operator<<(std::ostream& out, const Constraint& rhs);
83  };
84 } // namespace irafhy
85 #endif //REPRESENTATION_FORMAL_BASIC_CONSTRAINT_H
Definition: item.h:20
Definition: constraint.h:9
Item lhsExpression_
left hand side expression of the constraint
Definition: constraint.h:15
Definition: enum.h:107
RELATION relation_
relation between two expressions
Definition: constraint.h:23
~Constraint()=default
destructor
Constraint()=default
default constructor
Definition: condition.cpp:3
capd::interval rhsValue(const capd::interval &t, const std::vector< capd::interval > &in, const std::vector< capd::interval > &params) const
get the value of the right hand side expression
Definition: constraint.cpp:90
RELATION
relation between two expressions
Definition: enum.h:103
friend std::ostream & operator<<(std::ostream &out, const Constraint &rhs)
out the given constraint to standard stream
Definition: constraint.cpp:41
bool isSatisfy(const capd::interval &t, const std::vector< capd::interval > &in, const std::vector< capd::interval > &params) const
check the given values can hold the relation of the constraint or not
Definition: constraint.cpp:14
capd::interval lhsValue(const capd::interval &t, const std::vector< capd::interval > &in, const std::vector< capd::interval > &params) const
get the value of the left hand side expression
Definition: constraint.cpp:83
Item rhsExpression_
right hand side expression of the constraint
Definition: constraint.h:19
RELATION relation() const
get the relation of the constraint
Definition: constraint.cpp:39