#include <dpoint.hh>
Inheritance diagram for oln::abstract::dpoint< Exact >:
Public Types | |
enum | { dim = dpoint_traits<exact_type>::dim } |
typedef Exact | exact_type |
typedef dpoint< Exact > | self_type |
typedef dpoint_traits< exact_type >::point_type | point_type |
Public Member Functions | |
dpoint (const abstract::point< point_type > &p) | |
Construct a dpoint with the same coordinates a the point p. | |
coord | nth (const unsigned d) const |
Return the dth coordinate of the current dpoint. | |
coord & | nth (const unsigned d) |
Return a reference to the dth coordinate of the current dpoint. | |
exact_type | operator- () const |
Return a dpoint whose coordinates are the opposite of the current dpoint coordinates. | |
exact_type & | operator+= (const self_type &dp) |
Add a dpoint dp to the current dpoint. | |
exact_type & | operator-= (const self_type &dp) |
Subtract a dpoint dp from the current dpoint. | |
exact_type | operator+ (const self_type &dp) const |
Add a dpoint dp to the current dpoint. | |
exact_type | operator- (const self_type &dp) const |
Subtract a dpoint dp from the current dpoint. | |
bool | operator== (const self_type &dp) const |
Test if two dpoints have the same coordinates. | |
bool | operator!= (const self_type &dp) const |
Test if two dpoints do not have the same coordinates. | |
bool | is_centered (void) const |
Test if all the dpoint coordinates are set to zero. | |
ntg::float_d | norm2 (void) const |
Return the norm of the current dpoint. | |
ntg::float_d | sqr_norm2 (void) const |
Return the square of the norm of the current dpoint. | |
Static Public Member Functions | |
static std::string | name () |
Protected Member Functions | |
dpoint () |
Definition at line 71 of file dpoint.hh.
exact_type& oln::abstract::dpoint< Exact >::operator+= | ( | const self_type & | dp | ) | [inline] |
exact_type& oln::abstract::dpoint< Exact >::operator-= | ( | const self_type & | dp | ) | [inline] |
exact_type oln::abstract::dpoint< Exact >::operator+ | ( | const self_type & | dp | ) | const [inline] |
exact_type oln::abstract::dpoint< Exact >::operator- | ( | const self_type & | dp | ) | const [inline] |
bool oln::abstract::dpoint< Exact >::operator== | ( | const self_type & | dp | ) | const [inline] |
Test if two dpoints have the same coordinates.
Definition at line 167 of file dpoint.hh.
00168 { 00169 for (unsigned i = 0; i < dim; ++i) 00170 if (dp.nth(i) != nth(i)) 00171 return false; 00172 return true; 00173 }
bool oln::abstract::dpoint< Exact >::operator!= | ( | const self_type & | dp | ) | const [inline] |
Test if two dpoints do not have the same coordinates.
Definition at line 184 of file dpoint.hh.
00185 { 00186 for (unsigned i = 0; i < dim; ++i) 00187 if (dp.nth(i) != nth(i)) 00188 return true; 00189 return false; 00190 }
bool oln::abstract::dpoint< Exact >::is_centered | ( | void | ) | const [inline] |
Test if all the dpoint coordinates are set to zero.
Definition at line 199 of file dpoint.hh.
Referenced by oln::io::internal::read().
00200 { 00201 for (unsigned i = 0; i < dim; ++i) 00202 if (nth(i) != 0) 00203 return false; 00204 return true; 00205 }