1 #ifndef REPRESENTATION_GEOMETRIC_BASIC_POINT_H 2 #define REPRESENTATION_GEOMETRIC_BASIC_POINT_H 70 virtual ~Point() =
default;
75 [[nodiscard]] Eigen::VectorXd
coordinate()
const;
81 [[nodiscard]]
double value(std::size_t index)
const;
91 [[nodiscard]]
bool empty()
const;
204 const double&
operator[](std::size_t index)
const;
278 #endif //REPRESENTATION_GEOMETRIC_BASIC_POINT_H std::ostream & operator<<(std::ostream &out, const Condition &rhs)
output the right hand side condition to the standard out stream
Definition: condition.cpp:246
Eigen::VectorXd coordinate() const
get the coordinate of the point
Definition: point.cpp:38
Point()
default constructor
Definition: point.cpp:18
bool operator!=(const Point &rhs) const
relational operator
Definition: point.cpp:60
const Point operator*(const Point &lhs, double factor)
binary multiplication operator
Definition: point.cpp:189
Point & operator/=(double divisor)
division assignment operator
Definition: point.cpp:108
const Point operator/(const Point &lhs, double divisor)
binary division operator
Definition: point.cpp:187
virtual ~Point()=default
destructor
bool operator>(const Point &rhs) const
relational operator
Definition: point.cpp:54
bool empty() const
check if the point in valid space or not
Definition: point.cpp:48
bool operator<=(const Point &rhs) const
relational operator
Definition: point.cpp:52
double value(std::size_t index) const
get the value of coordinate in specified dimension
Definition: point.cpp:40
static Point one(std::size_t dimension=0)
constructor of a point which all elements of the coordinate are ones in given target space ...
Definition: point.cpp:12
bool operator>=(const Point &rhs) const
relational operator
Definition: point.cpp:56
Point & operator-()
unary minus operator
Definition: point.cpp:102
static Point zero(std::size_t dimension=0)
constructor of the origin of the given target space
Definition: point.cpp:6
const Point operator+(const Point &lhs, const Point &rhs)
binary addition operator
Definition: point.cpp:151
Point & operator-=(const Eigen::VectorXd &rhs)
subtraction assignment operator
Definition: point.cpp:82
Point & operator=(const Eigen::VectorXd &rhs)
assignment operator
Definition: point.cpp:125
Point & operator+=(const Eigen::VectorXd &rhs)
addition assignment operator
Definition: point.cpp:62
double & operator[](std::size_t index)
get the value of the specified dimension
Definition: point.cpp:137
Definition: condition.cpp:3
bool operator==(const Point &rhs) const
relational operator
Definition: point.cpp:58
int dimension() const
get the dimension of the space which the point in
Definition: point.cpp:46
bool operator<(const Point &rhs) const
relational operator
Definition: point.cpp:50
Eigen::VectorXd coordinate_
coordinate of the point
Definition: point.h:16
Point & operator*=(double factor)
multiplication assignment operator
Definition: point.cpp:117