irafhy
Interval arithmetic based Reachability Analysis Framework for Hybrid Automaton
binaryItem.h
Go to the documentation of this file.
1 #ifndef REPRESENTATION_FORMAL_BASIC_ENTITY_BINARY_ITEM_H
2 #define REPRESENTATION_FORMAL_BASIC_ENTITY_BINARY_ITEM_H
3 
4 #include <memory>
5 #include <capd/capdlib.h>
7 
8 namespace irafhy
9 {
10  class Item;
11 
12  class BinaryItem
13  {
14  private:
18  std::shared_ptr<Item> lhsOperand_;
22  std::shared_ptr<Item> rhsOperand_;
27 
28  public:
32  BinaryItem() = default;
39  BinaryItem(const Item& lhsOperand, const Item& rhsOperand, const BINARY& binaryOperator);
43  ~BinaryItem() = default;
48  [[nodiscard]] std::function<
49  capd::autodiff::Node(capd::autodiff::Node, capd::autodiff::Node[], int, capd::autodiff::Node[], int)>
50  arithmetic() const;
58  capd::interval value(const capd::interval& t,
59  const std::vector<capd::interval>& in,
60  const std::vector<capd::interval>& params);
67  friend std::ostream& operator<<(std::ostream& out, const BinaryItem& rhs);
68  };
69 } // namespace irafhy
70 #endif //REPRESENTATION_FORMAL_BASIC_ENTITY_BINARY_ITEM_H
Definition: item.h:20
~BinaryItem()=default
destructor
std::shared_ptr< Item > rhsOperand_
pointer to the right hand side operand
Definition: binaryItem.h:22
Definition: binaryItem.h:12
BINARY operator_
what kind of operation of the binary item indicates
Definition: binaryItem.h:26
friend std::ostream & operator<<(std::ostream &out, const BinaryItem &rhs)
out the given binary item to standard out stream
Definition: binaryItem.cpp:91
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 binary item
Definition: binaryItem.cpp:68
Definition: condition.cpp:3
std::shared_ptr< Item > lhsOperand_
pointer to the left hand side operand
Definition: binaryItem.h:18
std::function< capd::autodiff::Node(capd::autodiff::Node, capd::autodiff::Node[], int, capd::autodiff::Node[], int)> arithmetic() const
get the arithmetic function of the binary item
Definition: binaryItem.cpp:16
BinaryItem()=default
constructor
BINARY
supported binary math functions
Definition: enum.h:46