#include <constraint.h>
|
| 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 > ¶ms) 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 > ¶ms) 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 > ¶ms) const |
| get the value of the right hand side expression More...
|
|
RELATION | relation () const |
| get the relation of the constraint More...
|
|
◆ Constraint() [1/2]
irafhy::Constraint::Constraint |
( |
| ) |
|
|
default |
◆ Constraint() [2/2]
constructor with given expressions and relation
- Parameters
-
lhsExpression | left hand side expression |
rhsExpression | right hand side expression |
relation | relation between two expressions |
References lhsExpression_, relation(), relation_, and rhsExpression_.
◆ ~Constraint()
irafhy::Constraint::~Constraint |
( |
| ) |
|
|
default |
◆ 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
-
t | current time interval |
in | input values |
params | parameters 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().
◆ 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
-
t | current time interval |
in | input values |
params | parameters necessary |
- Returns
- value of the left hand sid expression
References lhsExpression_, and irafhy::Item::value().
Referenced by isSatisfy().
◆ 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
-
t | current time interval |
in | input values |
params | parameters necessary |
- Returns
- value of the right hand side expression
References rhsExpression_, and irafhy::Item::value().
Referenced by isSatisfy().
◆ operator<<
std::ostream& operator<< |
( |
std::ostream & |
out, |
|
|
const Constraint & |
rhs |
|
) |
| |
|
friend |
out the given constraint to standard stream
- Parameters
-
out | given out stream |
rhs | given constraint object |
- Returns
- resulting out stream
◆ lhsExpression_
Item irafhy::Constraint::lhsExpression_ |
|
private |
◆ relation_
RELATION irafhy::Constraint::relation_ = RELATION::EQUAL_TO |
|
private |
◆ rhsExpression_
Item irafhy::Constraint::rhsExpression_ |
|
private |
The documentation for this class was generated from the following files:
- /home/jianqiang/CLionProjects/irafhy/include/irafhy/representation/formal/basic/constraint.h
- /home/jianqiang/CLionProjects/irafhy/src/representation/formal/basic/constraint.cpp