irafhy
Interval arithmetic based Reachability Analysis Framework for Hybrid Automaton
irafhy::Formula Class Reference

#include <formula.h>

Collaboration diagram for irafhy::Formula:
Collaboration graph

Public Member Functions

 Formula ()=default
 constructor More...
 
 Formula (const Item &expression)
 constructor with given expression More...
 
std::function< capd::autodiff::Node(capd::autodiff::Node, capd::autodiff::Node[], int, capd::autodiff::Node[], int)> arithmetic () const
 get the arithmetic function of the current formula More...
 
capd::interval value (const capd::interval &t, const std::vector< capd::interval > &in, const std::vector< capd::interval > &params) const
 get the value of the current formula More...
 
bool isReversed () const
 check if the vector was reversed or not More...
 
void reverse () const
 reverse the direction of the vector More...
 

Private Attributes

Item expression_
 expression of the formula More...
 
bool isReversed_ = false
 indicate whether the direction of the vector reversed or not More...
 

Friends

std::ostream & operator<< (std::ostream &out, const Formula &rhs)
 out the given formula to standard out stream More...
 

Constructor & Destructor Documentation

◆ Formula() [1/2]

irafhy::Formula::Formula ( )
default

constructor

◆ Formula() [2/2]

irafhy::Formula::Formula ( const Item expression)
explicit

constructor with given expression

Parameters
expressiongiven expression

References expression_.

Member Function Documentation

◆ arithmetic()

std::function< capd::autodiff::Node(capd::autodiff::Node, capd::autodiff::Node[], int, capd::autodiff::Node[], int)> irafhy::Formula::arithmetic ( ) const

get the arithmetic function of the current formula

Returns
the arithmetic function of the current formula

References irafhy::Item::arithmetic(), expression_, and isReversed_.

Here is the call graph for this function:

◆ isReversed()

bool irafhy::Formula::isReversed ( ) const

check if the vector was reversed or not

Returns
TRUE if the vector was reversed

References isReversed_.

◆ reverse()

void irafhy::Formula::reverse ( ) const

reverse the direction of the vector

References isReversed_.

◆ value()

capd::interval irafhy::Formula::value ( const capd::interval &  t,
const std::vector< capd::interval > &  in,
const std::vector< capd::interval > &  params 
) const

get the value of the current formula

Parameters
ttime variable
invalues of the given variables
paramsother necessary parameters
Returns
the value of the current expression

References expression_, isReversed_, and irafhy::Item::value().

Referenced by irafhy::UpdateFunction::update().

Here is the call graph for this function:

Friends And Related Function Documentation

◆ operator<<

std::ostream& operator<< ( std::ostream &  out,
const Formula rhs 
)
friend

out the given formula to standard out stream

Parameters
outgiven out stream
rhsgiven formula
Returns
resulting out stream

Member Data Documentation

◆ expression_

Item irafhy::Formula::expression_
private

expression of the formula

Referenced by arithmetic(), Formula(), irafhy::operator<<(), and value().

◆ isReversed_

bool irafhy::Formula::isReversed_ = false
mutableprivate

indicate whether the direction of the vector reversed or not

Referenced by arithmetic(), isReversed(), irafhy::operator<<(), reverse(), and value().


The documentation for this class was generated from the following files: