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

#include <point.h>

Collaboration diagram for irafhy::Point:
Collaboration graph

Public Member Functions

 Point ()
 default constructor More...
 
 Point (const Point &point)=default
 copy constructor More...
 
 Point (Point &&point)=default
 move constructor More...
 
 Point (double value)
 constructor of the point in one dimensional space with given value as coordinate More...
 
 Point (const std::vector< double > &coordinate)
 constructor with given coordinate More...
 
 Point (const Eigen::VectorXd &coordinate)
 constructor with given coordinate More...
 
 Point (Eigen::VectorXd &&coordinate)
 constructor with given coordinate More...
 
virtual ~Point ()=default
 destructor More...
 
Eigen::VectorXd coordinate () const
 get the coordinate of the point More...
 
double value (std::size_t index) const
 get the value of coordinate in specified dimension More...
 
int dimension () const
 get the dimension of the space which the point in More...
 
bool empty () const
 check if the point in valid space or not More...
 
bool operator< (const Point &rhs) const
 relational operator More...
 
bool operator<= (const Point &rhs) const
 relational operator More...
 
bool operator> (const Point &rhs) const
 relational operator More...
 
bool operator>= (const Point &rhs) const
 relational operator More...
 
bool operator== (const Point &rhs) const
 relational operator More...
 
bool operator!= (const Point &rhs) const
 relational operator More...
 
Pointoperator+= (const Eigen::VectorXd &rhs)
 addition assignment operator More...
 
Pointoperator+= (const Point &rhs)
 addition assignment operator More...
 
Pointoperator-= (const Eigen::VectorXd &rhs)
 subtraction assignment operator More...
 
Pointoperator-= (const Point &rhs)
 subtraction assignment operator More...
 
Pointoperator- ()
 unary minus operator More...
 
Pointoperator/= (double divisor)
 division assignment operator More...
 
Pointoperator*= (double factor)
 multiplication assignment operator More...
 
Pointoperator= (const Eigen::VectorXd &rhs)
 assignment operator More...
 
Pointoperator= (Eigen::VectorXd &&rhs)
 assignment operator More...
 
Pointoperator= (const Point &rhs)=default
 assignment operator More...
 
Pointoperator= (Point &&rhs) noexcept=default
 assignment operator More...
 
double & operator[] (std::size_t index)
 get the value of the specified dimension More...
 
const double & operator[] (std::size_t index) const
 get the value of the specified dimension More...
 

Static Public Member Functions

static Point zero (std::size_t dimension=0)
 constructor of the origin of the given target space More...
 
static Point one (std::size_t dimension=0)
 constructor of a point which all elements of the coordinate are ones in given target space More...
 

Private Attributes

Eigen::VectorXd coordinate_
 coordinate of the point More...
 

Constructor & Destructor Documentation

◆ Point() [1/7]

irafhy::Point::Point ( )

◆ Point() [2/7]

irafhy::Point::Point ( const Point point)
default

copy constructor

Parameters
pointgiven point

◆ Point() [3/7]

irafhy::Point::Point ( Point &&  point)
default

move constructor

Parameters
pointgiven point

◆ Point() [4/7]

irafhy::Point::Point ( double  value)
explicit

constructor of the point in one dimensional space with given value as coordinate

Parameters
valuegiven value

References coordinate_, and value().

Here is the call graph for this function:

◆ Point() [5/7]

irafhy::Point::Point ( const std::vector< double > &  coordinate)
explicit

constructor with given coordinate

Parameters
coordinategiven coordinate of the point

References coordinate_.

◆ Point() [6/7]

irafhy::Point::Point ( const Eigen::VectorXd &  coordinate)
explicit

constructor with given coordinate

Parameters
coordinategiven coordinate of the point

References coordinate(), and coordinate_.

Here is the call graph for this function:

◆ Point() [7/7]

irafhy::Point::Point ( Eigen::VectorXd &&  coordinate)
explicit

constructor with given coordinate

Parameters
coordinategiven coordinate of the point

References coordinate(), and coordinate_.

Here is the call graph for this function:

◆ ~Point()

virtual irafhy::Point::~Point ( )
virtualdefault

destructor

Member Function Documentation

◆ coordinate()

Eigen::VectorXd irafhy::Point::coordinate ( ) const

◆ dimension()

int irafhy::Point::dimension ( ) const

get the dimension of the space which the point in

Returns
the dimension of the space

References coordinate_.

Referenced by irafhy::IntervalHull::contains(), irafhy::IntervalHull::IntervalHull(), operator*=(), irafhy::operator+(), operator+=(), irafhy::operator-(), operator-=(), and operator/=().

◆ empty()

bool irafhy::Point::empty ( ) const

check if the point in valid space or not

Returns
TRUE if the dimension of the space greater than zero

References coordinate_.

Referenced by irafhy::IntervalHull::IntervalHull().

◆ one()

Point irafhy::Point::one ( std::size_t  dimension = 0)
static

constructor of a point which all elements of the coordinate are ones in given target space

Parameters
dimensiondimension of target space
Returns
resulting point instance

References Point().

Here is the call graph for this function:

◆ operator!=()

bool irafhy::Point::operator!= ( const Point rhs) const

relational operator

Parameters
rhsright hand side of the operator
Returns
TRUE if the coordinate of the point unequal to the right hand side one's

References coordinate(), and coordinate_.

Here is the call graph for this function:

◆ operator*=()

Point & irafhy::Point::operator*= ( double  factor)

multiplication assignment operator

Parameters
factorgiven factor
Returns
resulting point whose coordinate is the product of the current coordinate and the given factor

References coordinate_, and dimension().

Here is the call graph for this function:

◆ operator+=() [1/2]

Point & irafhy::Point::operator+= ( const Eigen::VectorXd &  rhs)

addition assignment operator

Parameters
rhsright hand side of the operator
Returns
resulting point whose coordinate is the summation of the current coordinate and the right hand side one's

References coordinate_, and dimension().

Here is the call graph for this function:

◆ operator+=() [2/2]

Point & irafhy::Point::operator+= ( const Point rhs)

addition assignment operator

Parameters
rhsright hand side of the operator
Returns
resulting point whose coordinate is the summation of the current coordinate and the right hand side one's

References coordinate_, dimension(), and value().

Here is the call graph for this function:

◆ operator-()

Point & irafhy::Point::operator- ( )

unary minus operator

Returns
resulting point whose coordinate is the current coordinate multiply by minus one

References coordinate_.

◆ operator-=() [1/2]

Point & irafhy::Point::operator-= ( const Eigen::VectorXd &  rhs)

subtraction assignment operator

Parameters
rhsright hand side of the operator
Returns
resulting point whose coordinate is the subtraction of the current coordinate and the right hand side one's

References coordinate_, and dimension().

Here is the call graph for this function:

◆ operator-=() [2/2]

Point & irafhy::Point::operator-= ( const Point rhs)

subtraction assignment operator

Parameters
rhsright hand side of the operator
Returns
resulting point whose coordinate is the subtraction of the current coordinate and the right hand side one's

References coordinate_, dimension(), and value().

Here is the call graph for this function:

◆ operator/=()

Point & irafhy::Point::operator/= ( double  divisor)

division assignment operator

Parameters
divisorgiven divisor
Returns
resulting point whose coordinate is the quotient of the current coordinate divided by the given divisor

References coordinate_, and dimension().

Here is the call graph for this function:

◆ operator<()

bool irafhy::Point::operator< ( const Point rhs) const

relational operator

Parameters
rhsright hand side of the operator
Returns
TRUE if the coordinate of the point less than the right hand side one's

References coordinate(), and coordinate_.

Here is the call graph for this function:

◆ operator<=()

bool irafhy::Point::operator<= ( const Point rhs) const

relational operator

Parameters
rhsright hand side of the operator
Returns
TRUE if the coordinate of the point less than or equal to the right hand side one's

References coordinate(), and coordinate_.

Here is the call graph for this function:

◆ operator=() [1/4]

Point & irafhy::Point::operator= ( const Eigen::VectorXd &  rhs)

assignment operator

Parameters
rhsright hand side of the operator
Returns
resulting point

References coordinate_.

◆ operator=() [2/4]

Point & irafhy::Point::operator= ( Eigen::VectorXd &&  rhs)

assignment operator

Parameters
rhsright hand side of the operator
Returns
resulting point

References coordinate_.

◆ operator=() [3/4]

Point& irafhy::Point::operator= ( const Point rhs)
default

assignment operator

Parameters
rhsright hand side of the operator
Returns
resulting point

◆ operator=() [4/4]

Point& irafhy::Point::operator= ( Point &&  rhs)
defaultnoexcept

assignment operator

Parameters
rhsright hand side of the operator
Returns
resulting point

◆ operator==()

bool irafhy::Point::operator== ( const Point rhs) const

relational operator

Parameters
rhsright hand side of the operator
Returns
TRUE if the coordinate of the point equal to the right hand side one's

References coordinate(), and coordinate_.

Here is the call graph for this function:

◆ operator>()

bool irafhy::Point::operator> ( const Point rhs) const

relational operator

Parameters
rhsright hand side of the operator
Returns
TRUE if the coordinate of the point greater than the right hand side one's

References coordinate(), and coordinate_.

Here is the call graph for this function:

◆ operator>=()

bool irafhy::Point::operator>= ( const Point rhs) const

relational operator

Parameters
rhsright hand side of the operator
Returns
TRUE if the coordinate of the point greater than or equal to the right hand side one's

References coordinate(), and coordinate_.

Here is the call graph for this function:

◆ operator[]() [1/2]

double & irafhy::Point::operator[] ( std::size_t  index)

get the value of the specified dimension

Parameters
indexindex of the dimension
Returns
value of the specified dimension

References coordinate_.

◆ operator[]() [2/2]

const double & irafhy::Point::operator[] ( std::size_t  index) const

get the value of the specified dimension

Parameters
indexindex of the dimension
Returns
value of the specified dimension

References coordinate_.

◆ value()

double irafhy::Point::value ( std::size_t  index) const

get the value of coordinate in specified dimension

Parameters
indexindex of the dimension
Returns
value in target dimension

References coordinate_.

Referenced by operator+=(), operator-=(), and Point().

◆ zero()

Point irafhy::Point::zero ( std::size_t  dimension = 0)
static

constructor of the origin of the given target space

Parameters
dimensiondimension of the target space
Returns
resulting origin

References Point().

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

Here is the call graph for this function:

Member Data Documentation

◆ coordinate_


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