irafhy
Interval arithmetic based Reachability Analysis Framework for Hybrid Automaton
variable.h
Go to the documentation of this file.
1 #ifndef REPRESENTATION_FORMAL_BASIC_ENTITY_VARIABLE_H
2 #define REPRESENTATION_FORMAL_BASIC_ENTITY_VARIABLE_H
3 
4 #include <capd/capdlib.h>
5 #include <functional>
6 
7 namespace irafhy
8 {
9  class Variable
10  {
11  private:
15  long int index_ = -2;
16 
17  public:
21  Variable() = default;
26  explicit Variable(long index);
30  ~Variable() = default;
35  [[nodiscard]] std::function<
36  capd::autodiff::Node(capd::autodiff::Node, capd::autodiff::Node[], int, capd::autodiff::Node[], int)>
37  arithmetic() const;
45  capd::interval value(const capd::interval& t,
46  const std::vector<capd::interval>& in,
47  const std::vector<capd::interval>& params);
54  friend std::ostream& operator<<(std::ostream& out, const Variable& rhs);
55  };
56 } // namespace irafhy
57 #endif //REPRESENTATION_FORMAL_BASIC_ENTITY_VARIABLE_H
std::function< capd::autodiff::Node(capd::autodiff::Node, capd::autodiff::Node[], int, capd::autodiff::Node[], int)> arithmetic() const
get the arithmetic function of the variable item
Definition: variable.cpp:12
long int index_
index of the variable in the variables&#39; list, default set to -2(meaning invalid variable), -1 refers to the time variable
Definition: variable.h:15
Variable()=default
default constructor
Definition: condition.cpp:3
Definition: variable.h:9
~Variable()=default
destructor
friend std::ostream & operator<<(std::ostream &out, const Variable &rhs)
out the given variable to the standard out stream
Definition: variable.cpp:36
capd::interval value(const capd::interval &t, const std::vector< capd::interval > &in, const std::vector< capd::interval > &params)
get the value of the current variable
Definition: variable.cpp:28