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

#include <constraint.h>

Collaboration diagram for irafhy::Constraint:
Collaboration graph

Public Member Functions

 Constraint ()=default
 default constructor More...
 
 Constraint (const Item &lhsExpression, const Item &rhsExpression, RELATION relation)
 constructor with given expressions and relation More...
 
 ~Constraint ()=default
 destructor More...
 
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 More...
 
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 More...
 
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 More...
 
RELATION relation () const
 get the relation of the constraint More...
 

Private Attributes

Item lhsExpression_
 left hand side expression of the constraint More...
 
Item rhsExpression_
 right hand side expression of the constraint More...
 
RELATION relation_ = RELATION::EQUAL_TO
 relation between two expressions More...
 

Friends

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

Constructor & Destructor Documentation

◆ Constraint() [1/2]

irafhy::Constraint::Constraint ( )
default

default constructor

◆ Constraint() [2/2]

irafhy::Constraint::Constraint ( const Item lhsExpression,
const Item rhsExpression,
irafhy::RELATION  relation 
)

constructor with given expressions and relation

Parameters
lhsExpressionleft hand side expression
rhsExpressionright hand side expression
relationrelation between two expressions

References lhsExpression_, relation(), relation_, and rhsExpression_.

Here is the call graph for this function:

◆ ~Constraint()

irafhy::Constraint::~Constraint ( )
default

destructor

Member Function Documentation

◆ isSatisfy()

bool irafhy::Constraint::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

Parameters
tcurrent time interval
ininput values
paramsparameters necessary
Returns
TRUE if the given values hold the relation of the constraint

References irafhy::EQUAL_TO, irafhy::GREATER_THAN, irafhy::GREATER_THAN_OR_EQUAL_TO, irafhy::LESS_THAN, irafhy::LESS_THAN_OR_EQUAL_TO, lhsExpression_, lhsValue(), relation_, rhsExpression_, rhsValue(), irafhy::UNEQUAL_TO, and irafhy::Item::value().

Here is the call graph for this function:

◆ lhsValue()

capd::interval irafhy::Constraint::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

Parameters
tcurrent time interval
ininput values
paramsparameters necessary
Returns
value of the left hand sid expression

References lhsExpression_, and irafhy::Item::value().

Referenced by isSatisfy().

Here is the call graph for this function:

◆ relation()

RELATION irafhy::Constraint::relation ( ) const

get the relation of the constraint

Returns
the relation of the constraint

References relation_.

Referenced by Constraint().

◆ rhsValue()

capd::interval irafhy::Constraint::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

Parameters
tcurrent time interval
ininput values
paramsparameters necessary
Returns
value of the right hand side expression

References rhsExpression_, and irafhy::Item::value().

Referenced by isSatisfy().

Here is the call graph for this function:

Friends And Related Function Documentation

◆ operator<<

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

out the given constraint to standard stream

Parameters
outgiven out stream
rhsgiven constraint object
Returns
resulting out stream

Member Data Documentation

◆ lhsExpression_

Item irafhy::Constraint::lhsExpression_
private

left hand side expression of the constraint

Referenced by Constraint(), isSatisfy(), lhsValue(), and irafhy::operator<<().

◆ relation_

RELATION irafhy::Constraint::relation_ = RELATION::EQUAL_TO
private

relation between two expressions

Referenced by Constraint(), isSatisfy(), irafhy::operator<<(), and relation().

◆ rhsExpression_

Item irafhy::Constraint::rhsExpression_
private

right hand side expression of the constraint

Referenced by Constraint(), isSatisfy(), irafhy::operator<<(), and rhsValue().


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