Open
Graph Drawing
Framework

 v.2007.11
 

ogdf::DVector Class Reference

Vectos with real coordinates. More...

#include <geometry.h>

Inheritance diagram for ogdf::DVector:

ogdf::DPoint ogdf::GenericPoint< double >

List of all members.

Public Member Functions

 DVector ()
 Creates a vector (0,0).
 DVector (double x, double y)
 Creates a vector (x,y).
 DVector (const DVector &dv)
 Copy constructor.
DVector operator= (const DPoint &ip)
 Assignment operator.
DVector operator * (const double val) const
 Multiplies all coordinates with val.
DVector operator/ (const double val) const
 Divides all coordinates by val.
double length () const
 Returns the length of the vector.
double operator^ (const DVector &dv) const
 Returns the determinante of the vector.
double operator * (const DVector &dv) const
 Returns the scalar product of this vecor and dv.
DVector operator++ () const
 Returns a vector that is orthogonal to this vector.
DVector operator-- () const
 Returns a vector that is orthogonal to this vector.


Detailed Description

Vectos with real coordinates.

Definition at line 270 of file geometry.h.


Constructor & Destructor Documentation

ogdf::DVector::DVector (  )  [inline]

Creates a vector (0,0).

Definition at line 274 of file geometry.h.

ogdf::DVector::DVector ( double  x,
double  y 
) [inline]

Creates a vector (x,y).

Definition at line 277 of file geometry.h.

ogdf::DVector::DVector ( const DVector dv  )  [inline]

Copy constructor.

Definition at line 280 of file geometry.h.


Member Function Documentation

DVector ogdf::DVector::operator= ( const DPoint ip  )  [inline]

Assignment operator.

Definition at line 283 of file geometry.h.

DVector ogdf::DVector::operator * ( const double  val  )  const

Multiplies all coordinates with val.

DVector ogdf::DVector::operator/ ( const double  val  )  const

Divides all coordinates by val.

double ogdf::DVector::length (  )  const

Returns the length of the vector.

double ogdf::DVector::operator^ ( const DVector dv  )  const

Returns the determinante of the vector.

double ogdf::DVector::operator * ( const DVector dv  )  const

Returns the scalar product of this vecor and dv.

DVector ogdf::DVector::operator++ (  )  const

Returns a vector that is orthogonal to this vector.

Returns the vector $(y/x,1)$ if $x\neq 0$, or $(1,0)$ otherwise, where $(x,y)$ is this vector.

DVector ogdf::DVector::operator-- (  )  const

Returns a vector that is orthogonal to this vector.

Returns the vector $(-y/x,-1)$ if $x\neq 0$, or $(-1,0)$ otherwise, where $(x,y)$ is this vector.


The documentation for this class was generated from the following file:

© 1999-2007 by oreas GmbH, © 2005-2007 by University Dortmund and University Cologne.

Generated on Thu Nov 22 19:40:07 2007 by doxygen 1.5.4.