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

#include <halfSpace.h>

Collaboration diagram for irafhy::HalfSpace:
Collaboration graph

Public Member Functions

 HalfSpace ()
 default constructor More...
 
 HalfSpace (const HalfSpace &halfSpace)=default
 copy constructor More...
 
 HalfSpace (HalfSpace &&halfSpace)=default
 move constructor More...
 
 HalfSpace (const Eigen::VectorXd &normal, double offset)
 constructor with given normal and offset More...
 
 HalfSpace (Eigen::VectorXd &&normal, double &&offset)
 constructor with given normal and offset More...
 
virtual ~HalfSpace ()=default
 destructor More...
 
int dimension () const
 get the dimension of the half space More...
 
Eigen::VectorXd normal () const
 get the normal of the half space More...
 
double offset () const
 get the offset of the half space More...
 
bool contains (const Point &point) const
 check if the given point inside the half space or not More...
 
bool contains (const Eigen::VectorXd &coordinate) const
 check the given coordinate inside the half space or not More...
 
bool holds (const Point &point) const
 check if the given point on the boundary of the half space or not More...
 
bool holds (const Eigen::VectorXd &coordinate) const
 check if the given coordinate on the boundary of the half space More...
 
bool intersect (const Eigen::VectorXd &lhsEndPoint, const Eigen::VectorXd &rhsEndPoint, Eigen::VectorXd &intersection) const
 check if the line segment between two points intersect with the half space or not More...
 
HalfSpaceoperator= (const HalfSpace &halfSpace)=default
 assignment operator More...
 
HalfSpaceoperator= (HalfSpace &&halfSpace) noexcept=default
 assignment operator More...
 
HalfSpaceoperator- ()
 reverse the normal of the half space More...
 
HalfSpacereverse ()
 reverse the normal the of the half space More...
 

Static Public Member Functions

static HalfSpace Empty (std::size_t dimension=0)
 static constructor of Empty half space object More...
 

Private Attributes

Eigen::VectorXd normal_
 normal of the half space which defined by normal * x + offset <= 0 More...
 
double offset_
 offset used to define the half space More...
 

Constructor & Destructor Documentation

◆ HalfSpace() [1/5]

irafhy::HalfSpace::HalfSpace ( )

default constructor

References normal_, and offset_.

Referenced by Empty().

◆ HalfSpace() [2/5]

irafhy::HalfSpace::HalfSpace ( const HalfSpace halfSpace)
default

copy constructor

Parameters
halfSpacegiven half space

◆ HalfSpace() [3/5]

irafhy::HalfSpace::HalfSpace ( HalfSpace &&  halfSpace)
default

move constructor

Parameters
halfSpacegiven half space

◆ HalfSpace() [4/5]

irafhy::HalfSpace::HalfSpace ( const Eigen::VectorXd &  normal,
double  offset 
)

constructor with given normal and offset

Parameters
normalgiven normal
offsetgiven offset

References normal(), normal_, offset(), and offset_.

Here is the call graph for this function:

◆ HalfSpace() [5/5]

irafhy::HalfSpace::HalfSpace ( Eigen::VectorXd &&  normal,
double &&  offset 
)

constructor with given normal and offset

Parameters
normalgiven normal
offsetgiven offset

References normal(), normal_, offset(), and offset_.

Here is the call graph for this function:

◆ ~HalfSpace()

virtual irafhy::HalfSpace::~HalfSpace ( )
virtualdefault

destructor

Member Function Documentation

◆ contains() [1/2]

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

check if the given point inside the half space or not

Parameters
pointgiven point
Returns
TRUE if the given point inside the half space

References irafhy::Point::coordinate(), normal_, and offset_.

Here is the call graph for this function:

◆ contains() [2/2]

bool irafhy::HalfSpace::contains ( const Eigen::VectorXd &  coordinate) const

check the given coordinate inside the half space or not

Parameters
coordinategiven coordinate
Returns
TRUE if the given coordinate inside the half space

References normal_, and offset_.

◆ dimension()

int irafhy::HalfSpace::dimension ( ) const

get the dimension of the half space

Returns
the dimension of the half space

References normal_.

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

◆ Empty()

HalfSpace irafhy::HalfSpace::Empty ( std::size_t  dimension = 0)
static

static constructor of Empty half space object

Parameters
dimensiondimension of the half space
Returns
Empty half space object in given dimension space

References HalfSpace().

Referenced by irafhy::Polytope::Empty().

Here is the call graph for this function:

◆ holds() [1/2]

bool irafhy::HalfSpace::holds ( const Point point) const

check if the given point on the boundary of the half space or not

Parameters
pointgiven point
Returns
TRUE if the given coordinate hold the constraint which defines the half space

References irafhy::Point::coordinate(), normal_, and offset_.

Here is the call graph for this function:

◆ holds() [2/2]

bool irafhy::HalfSpace::holds ( const Eigen::VectorXd &  coordinate) const

check if the given coordinate on the boundary of the half space

Parameters
coordinategiven coordinate
Returns
TRUE if the given coordinate hold the constraint which defines the half space

References normal_, and offset_.

◆ intersect()

bool irafhy::HalfSpace::intersect ( const Eigen::VectorXd &  lhsEndPoint,
const Eigen::VectorXd &  rhsEndPoint,
Eigen::VectorXd &  intersection 
) const

check if the line segment between two points intersect with the half space or not

Parameters
lhsEndPointleft hand side point of the line segment
rhsEndPointright hand side point of the line segment
intersectionintersection of the line segment with the half space
Returns
TRUE if the line segment intersect with the half space

References dimension(), normal_, and offset_.

Here is the call graph for this function:

◆ normal()

Eigen::VectorXd irafhy::HalfSpace::normal ( ) const

get the normal of the half space

Returns
the normal of the half space

References normal_.

Referenced by HalfSpace(), and irafhy::operator<<().

◆ offset()

double irafhy::HalfSpace::offset ( ) const

get the offset of the half space

Returns
the offset of the half space

References offset_.

Referenced by HalfSpace(), and irafhy::operator<<().

◆ operator-()

HalfSpace & irafhy::HalfSpace::operator- ( )

reverse the normal of the half space

Returns
resulting half space

References normal_, and offset_.

◆ operator=() [1/2]

HalfSpace& irafhy::HalfSpace::operator= ( const HalfSpace halfSpace)
default

assignment operator

Parameters
halfSpaceright hand side half space object
Returns
resulting half space

◆ operator=() [2/2]

HalfSpace& irafhy::HalfSpace::operator= ( HalfSpace &&  halfSpace)
defaultnoexcept

assignment operator

Parameters
halfSpaceright hand side half space object
Returns
resulting half space

◆ reverse()

HalfSpace & irafhy::HalfSpace::reverse ( )

reverse the normal the of the half space

Returns
resulting half space

References normal_, and offset_.

Member Data Documentation

◆ normal_

Eigen::VectorXd irafhy::HalfSpace::normal_
private

normal of the half space which defined by normal * x + offset <= 0

Referenced by contains(), dimension(), HalfSpace(), holds(), intersect(), normal(), operator-(), and reverse().

◆ offset_

double irafhy::HalfSpace::offset_
private

offset used to define the half space

Referenced by contains(), HalfSpace(), holds(), intersect(), offset(), operator-(), and reverse().


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