Vector Class Reference

A Vector of doubles that is built on std::vector. More...

#include <Vector.hpp>

List of all members.

Public Member Functions

 Vector ()
 Creates an empty Vector.

 Vector (unsigned int size)
double SquaredDistance (Vector const &v) const
 Calculates the Squared euklidian distance between this Vector and the supplied Vector v, ||this - v||^2.

double Distance (Vector const &v) const
 Calculates the euklidian distance between this Vector and the supplied Vector v, ||this - v||.


Friends

Vector operator- (Vector const &u, Vector const &v)
Vector operator+ (Vector const &u, Vector const &v)
Vector operator+= (Vector &u, Vector const &v)
Vector operator * (Vector const &u, double d)
std::ostream & operator<< (std::ostream &o, Vector const &v)


Detailed Description

A Vector of doubles that is built on std::vector.


Constructor & Destructor Documentation

Vector  ) 
 

Creates an empty Vector.

Vector unsigned int  size  ) 
 

Parameters:
size The number of pre-allocated elements in the new Vector.


Member Function Documentation

double SquaredDistance Vector const &  v  )  const
 

Calculates the Squared euklidian distance between this Vector and the supplied Vector v, ||this - v||^2.

Parameters:
v a Vector.
Returns:
The squared distance to v.

double Distance Vector const &  v  )  const
 

Calculates the euklidian distance between this Vector and the supplied Vector v, ||this - v||.

Parameters:
v a Vector.
Returns:
The distance to v.


Friends And Related Function Documentation

Vector operator- Vector const &  u,
Vector const &  v
[friend]
 

Vector operator+ Vector const &  u,
Vector const &  v
[friend]
 

Vector operator+= Vector u,
Vector const &  v
[friend]
 

Vector operator * Vector const &  u,
double  d
[friend]
 

std::ostream& operator<< std::ostream &  o,
Vector const &  v
[friend]
 


Generated on Mon Mar 22 16:40:50 2004 for GNG_GL by doxygen 1.3.6