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

#include <condition.h>

Collaboration diagram for irafhy::Condition:
Collaboration graph

Public Member Functions

 Condition ()
 constructor More...
 
 Condition (const std::vector< Point > &points, GEOMETRY geometry)
 constructor with given points More...
 
 Condition (const std::vector< capd::interval > &constraints, GEOMETRY geometry)
 constructor with given constraints More...
 
 Condition (const GeoEntity &geoEntity)
 constructor with given geometry entity More...
 
 Condition (const Point &center, double radius, GEOMETRY geometry)
 constructor with given center, radius More...
 
 Condition (const capd::C0Rect2Set &set, GEOMETRY geometry)
 constructor with given set More...
 
 ~Condition ()=default
 destructor More...
 
capd::IVector constraints () const
 get the constraints of the condition More...
 
GeoEntity entity () const
 get the geometry entity of the condition More...
 
bool empty () const
 check if the condition is empty or not More...
 
int dimension () const
 get the dimension of the condition More...
 
bool intersect (const Condition &rhs, Condition &result) const
 get the intersection between two conditions More...
 
Condition unite (const Condition &rhs) const
 get the union of the two conditions More...
 
Point randInnerPoint () const
 get an point from the condition randomly More...
 
Point centroid () const
 get the centroid of the condition More...
 
bool contains (const Condition &rhs) const
 check if the current condition contains the given condition More...
 
bool contains (const Point &point) const
 check if the current condition contains the given point More...
 
std::vector< Pointvertices () const
 get the extrem vertices of the condtion More...
 
capd::C0Rect2Set set () const
 get the set representation of the current condition More...
 

Static Public Member Functions

static Condition Empty (GEOMETRY geometry=GEOMETRY::INTERVAL_HULL, std::size_t dimension=0)
 constructor for empty condition More...
 

Private Attributes

GeoEntity geoEntity_
 entity of the condition More...
 

Constructor & Destructor Documentation

◆ Condition() [1/6]

irafhy::Condition::Condition ( )

constructor

References irafhy::IntervalHull::Empty(), and geoEntity_.

Referenced by Empty(), intersect(), and unite().

Here is the call graph for this function:

◆ Condition() [2/6]

irafhy::Condition::Condition ( const std::vector< Point > &  points,
GEOMETRY  geometry 
)
explicit

constructor with given points

Parameters
pointsgiven points
geometrykind of the geometry entity

References geoEntity_, irafhy::INTERVAL_HULL, and irafhy::POLYTOPE.

◆ Condition() [3/6]

irafhy::Condition::Condition ( const std::vector< capd::interval > &  constraints,
irafhy::GEOMETRY  geometry 
)
explicit

constructor with given constraints

Parameters
constraintsgiven constraints
geometrykind of the geometry entity

References geoEntity_, irafhy::INTERVAL_HULL, and irafhy::POLYTOPE.

◆ Condition() [4/6]

irafhy::Condition::Condition ( const GeoEntity geoEntity)
explicit

constructor with given geometry entity

Parameters
geoEntitygiven geometry entity

References geoEntity_.

◆ Condition() [5/6]

irafhy::Condition::Condition ( const Point center,
double  radius,
GEOMETRY  geometry 
)

constructor with given center, radius

Parameters
centercenter of the geometry object
radiusradius used for geometry object constructing
geometrykind of the geometry entity

References geoEntity_, irafhy::INTERVAL_HULL, and irafhy::POLYTOPE.

◆ Condition() [6/6]

irafhy::Condition::Condition ( const capd::C0Rect2Set &  set,
GEOMETRY  geometry 
)

constructor with given set

Parameters
setthe given capd set
geometrykind of the geometry entity

References geoEntity_, irafhy::INTERVAL_HULL, and irafhy::POLYTOPE.

◆ ~Condition()

irafhy::Condition::~Condition ( )
default

destructor

Member Function Documentation

◆ centroid()

Point irafhy::Condition::centroid ( ) const

get the centroid of the condition

Returns
the centroid of the entity

References geoEntity_, irafhy::INTERVAL_HULL, and irafhy::POLYTOPE.

◆ constraints()

capd::IVector irafhy::Condition::constraints ( ) const

get the constraints of the condition

Returns
the constraints of the condition

References geoEntity_, irafhy::INTERVAL_HULL, and irafhy::POLYTOPE.

◆ contains() [1/2]

bool irafhy::Condition::contains ( const Condition rhs) const

check if the current condition contains the given condition

Parameters
rhsthe right hand side condition
Returns
TRUE if the current condition contains the right hand side one

References entity(), geoEntity_, irafhy::INTERVAL_HULL, and irafhy::POLYTOPE.

Here is the call graph for this function:

◆ contains() [2/2]

bool irafhy::Condition::contains ( const Point point) const

check if the current condition contains the given point

Parameters
pointthe right hand side point
Returns
TRUE if the current condition contains the given point

◆ dimension()

int irafhy::Condition::dimension ( ) const

get the dimension of the condition

Returns

References geoEntity_, irafhy::INTERVAL_HULL, and irafhy::POLYTOPE.

Referenced by intersect().

◆ Empty()

Condition irafhy::Condition::Empty ( GEOMETRY  geometry = GEOMETRY::INTERVAL_HULL,
std::size_t  dimension = 0 
)
static

constructor for empty condition

Parameters
geometrykind of the geometry entity
dimensiondimension of the condition
Returns
the resulting empty condition

References Condition(), irafhy::IntervalHull::Empty(), irafhy::Polytope::Empty(), irafhy::INTERVAL_HULL, and irafhy::POLYTOPE.

Referenced by irafhy::SettingsVisitor::visitInitialconditionsetting().

Here is the call graph for this function:

◆ empty()

bool irafhy::Condition::empty ( ) const

check if the condition is empty or not

Returns
TRUE if the condition is in zero dimensional space or volume if equal to zero

References geoEntity_, irafhy::INTERVAL_HULL, and irafhy::POLYTOPE.

Referenced by irafhy::Settings::initCondition(), and irafhy::Settings::setInitCondition().

◆ entity()

GeoEntity irafhy::Condition::entity ( ) const

get the geometry entity of the condition

Returns
the geometry entity of the condition

References geoEntity_.

Referenced by contains(), intersect(), irafhy::operator<<(), and unite().

◆ intersect()

bool irafhy::Condition::intersect ( const Condition rhs,
Condition result 
) const

get the intersection between two conditions

Parameters
rhsthe right hand side condition
resultintersection condition
Returns
TRUE if the intersection is not empty

References Condition(), dimension(), irafhy::IntervalHull::Empty(), entity(), geoEntity_, irafhy::IntervalHull::intersect(), irafhy::INTERVAL_HULL, and irafhy::POLYTOPE.

Here is the call graph for this function:

◆ randInnerPoint()

Point irafhy::Condition::randInnerPoint ( ) const

get an point from the condition randomly

Returns
the resulting point

References geoEntity_, irafhy::INTERVAL_HULL, and irafhy::POLYTOPE.

◆ set()

capd::C0Rect2Set irafhy::Condition::set ( ) const

get the set representation of the current condition

Returns
the resulting set representation

References irafhy::IntervalHull::constraints(), irafhy::IntervalHull::dimension(), geoEntity_, irafhy::INTERVAL_HULL, and irafhy::POLYTOPE.

Here is the call graph for this function:

◆ unite()

Condition irafhy::Condition::unite ( const Condition rhs) const

get the union of the two conditions

Parameters
rhsthe right hand side condition
Returns
the union of the conditions

References Condition(), entity(), geoEntity_, irafhy::INTERVAL_HULL, irafhy::POLYTOPE, and irafhy::IntervalHull::unite().

Here is the call graph for this function:

◆ vertices()

std::vector< Point > irafhy::Condition::vertices ( ) const

get the extrem vertices of the condtion

Returns
the resulting vertices

References geoEntity_, irafhy::INTERVAL_HULL, and irafhy::POLYTOPE.

Member Data Documentation

◆ geoEntity_

GeoEntity irafhy::Condition::geoEntity_
private

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