template<typename T>
class lemon::dim2::Point< T >
A simple two dimensional vector (plain vector) implementation with the usual vector operations.
|
| Point () |
| Default constructor.
|
|
| Point (T a, T b) |
| Construct an instance from coordinates.
|
|
int | size () const |
| Returns the dimension of the vector (i.e. returns 2).
|
|
T & | operator[] (int idx) |
| Subscripting operator.
|
|
const T & | operator[] (int idx) const |
| Const subscripting operator.
|
|
template<class TT > |
| Point (const Point< TT > &p) |
| Conversion constructor.
|
|
T | normSquare () const |
| Give back the square of the norm of the vector.
|
|
Point< T > & | operator+= (const Point< T > &u) |
| Increment the left hand side by u .
|
|
Point< T > & | operator-= (const Point< T > &u) |
| Decrement the left hand side by u .
|
|
Point< T > & | operator*= (const T &u) |
| Multiply the left hand side with a scalar.
|
|
Point< T > & | operator/= (const T &u) |
| Divide the left hand side by a scalar.
|
|
T | operator* (const Point< T > &u) const |
| Return the scalar product of two vectors.
|
|
Point< T > | operator+ (const Point< T > &u) const |
| Return the sum of two vectors.
|
|
Point< T > | operator- () const |
| Return the negative of the vector.
|
|
Point< T > | operator- (const Point< T > &u) const |
| Return the difference of two vectors.
|
|
Point< T > | operator* (const T &u) const |
| Return a vector multiplied by a scalar.
|
|
Point< T > | operator/ (const T &u) const |
| Return a vector divided by a scalar.
|
|
bool | operator== (const Point< T > &u) const |
| Test equality.
|
|
bool | operator!= (Point u) const |
| Test inequality.
|
|