#include <lemon/xy.h>
Inheritance diagram for xy:
Definition at line 49 of file xy.h.
Public Member Functions | |
xy () | |
Default constructor: both coordinates become 0. | |
xy (T a, T b) | |
Constructing the instance from coordinates. | |
template<class TT> | |
xy (const xy< TT > &p) | |
Conversion constructor. | |
T | normSquare () |
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) |
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) |
Testing equality. | |
bool | operator!= (xy u) |
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, xy< T > z) |
Write a plainvector to a stream. |