Open
Graph Drawing
Framework

 v.2012.05
 

ogdf::DVector Class Reference

Vectos with real coordinates. More...

#include <ogdf/basic/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 262 of file geometry.h.


Constructor & Destructor Documentation

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

Creates a vector (0,0).

Definition at line 266 of file geometry.h.

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

Creates a vector (x,y).

Definition at line 269 of file geometry.h.

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

Copy constructor.

Definition at line 272 of file geometry.h.


Member Function Documentation

double ogdf::DVector::length ( ) const

Returns the length of the vector.

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

Multiplies all coordinates with val.

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.

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

Divides all coordinates by val.

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

Assignment operator.

Definition at line 275 of file geometry.h.

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

Returns the determinante of the vector.


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