xy Class Template Reference
[Miscellaneous Tools]

#include <xy.h>

List of all members.


Detailed Description

template<typename T>
class lemon::xy< T >

A two dimensional vector (plainvector) implementation with the usual vector operators.

Author:
Attila Bernath

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.
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.
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 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.)

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.


The documentation for this class was generated from the following file:
Generated on Thu Sep 30 12:18:40 2004 for LEMON by doxygen 1.3.8