Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

xy Class Template Reference
[Miscellaneous Tools]

#include <lemon/xy.h>

Inheritance diagram for xy:

Inheritance graph
[legend]
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.
template<class TT>
 xy (const xy< TT > &p)
 Conversion constructor.
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
 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.


The documentation for this class was generated from the following file:
Generated on Sat Mar 19 10:58:55 2005 for LEMON by  doxygen 1.4.1