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>

List of all members.


Detailed Description

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

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

Author:
Attila Bernath


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.
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.
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::istreamoperator>> (std::istream &is, xy< T > &z)
 Read a plainvector from a stream.
std::ostreamoperator<< (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.


The documentation for this class was generated from the following file:
Generated on Sat Aug 27 14:16:14 2005 for LEMON by  doxygen 1.4.4