#include <lemon/xy.h>
Public Member Functions | |
xy () | |
Default constructor. | |
xy (T a, T b) | |
Constructing the instance from coordinates. | |
template<class TT> | |
xy (const xy< TT > &p) | |
Conversion constructor. | |
T | normSquare () const |
Gives back the square of the norm of the vector. | |
xy< T > & | operator+= (const xy< T > &u) |
Increments the left hand side by u. | |
xy< T > & | operator-= (const xy< T > &u) |
Decrements the left hand side by u. | |
xy< T > & | operator *= (const T &u) |
Multiplying the left hand side with a scalar. | |
xy< T > & | operator/= (const T &u) |
Dividing the left hand side by a scalar. | |
T | operator * (const xy< T > &u) const |
Returns the scalar product of two vectors. | |
xy< T > | operator+ (const xy< T > &u) const |
Returns the sum of two vectors. | |
xy< T > | operator- () const |
Returns the neg of the vectors. | |
xy< T > | operator- (const xy< T > &u) const |
Returns the difference of two vectors. | |
xy< T > | operator * (const T &u) const |
Returns a vector multiplied by a scalar. | |
xy< T > | operator/ (const T &u) const |
Returns a vector divided by a scalar. | |
bool | operator== (const xy< T > &u) const |
Testing equality. | |
bool | operator!= (xy u) const |
Testing inequality. | |
Related Functions | |
(Note that these are not member functions.) | |
xy< T > | operator * (const T &u, const xy< T > &x) |
Returns a vector multiplied by a scalar. | |
std::istream & | operator>> (std::istream &is, xy< T > &z) |
Read a plainvector from a stream. | |
std::ostream & | operator<< (std::ostream &os, const xy< T > &z) |
Write a plainvector to a stream. | |
xy< T > | rot90 (const xy< T > &z) |
Rotate by 90 degrees. | |
xy< T > | rot270 (const xy< T > &z) |
Rotate by 270 degrees. |