Vectors with real coordinates. More...
#include <ogdf/basic/geometry.h>
Inheritance diagram for ogdf::DVector: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. | |
| double | length () const |
| Returns the length of the vector. | |
| DVector | operator* (const double val) const |
| Multiplies all coordinates with val. | |
| 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. | |
| DVector | operator/ (const double val) const |
| Divides all coordinates by val. | |
| DVector | operator= (const DPoint &ip) |
| Assignment operator. | |
| double | operator^ (const DVector &dv) const |
| Returns the determinante of the vector. | |
Public Member Functions inherited from ogdf::DPoint | |
| DPoint () | |
| Creates a real point (0,0). | |
| DPoint (double x, double y) | |
| Creates a real point (x,y). | |
| DPoint (const DPoint &dp) | |
| Copy constructor. | |
| double | distance (const DPoint &p) const |
| Returns the euclidean distance between p and this point. | |
| double | norm () const |
| Returns the norm of the point. | |
| DPoint | operator+ (const DPoint &p) const |
| Addition of real points. | |
| DPoint | operator- (const DPoint &p) const |
| Subtraction of real points. | |
| bool | operator== (const DPoint &dp) const |
| Relaxed equality operator. | |
Public Member Functions inherited from ogdf::GenericPoint< double > | |
| GenericPoint () | |
| Creates a generic point. | |
| GenericPoint (doublex, doubley) | |
| Creates a generic point (x,y). | |
| GenericPoint (const GenericPoint &ip) | |
| Copy constructor. | |
| bool | operator!= (const GenericPoint &ip) const |
| Inequality operator. | |
| GenericPoint | operator= (const GenericPoint &ip) |
| Assignment operator. | |
| bool | operator== (const GenericPoint &ip) const |
| Equality operator. | |
Vectors with real coordinates.
Definition at line 267 of file geometry.h.
|
inline |
Creates a vector (0,0).
Definition at line 271 of file geometry.h.
|
inline |
Creates a vector (x,y).
Definition at line 274 of file geometry.h.
|
inline |
Copy constructor.
Definition at line 277 of file geometry.h.
| 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.
Assignment operator.
Definition at line 280 of file geometry.h.
| double ogdf::DVector::operator^ | ( | const DVector & | dv | ) | const |
Returns the determinante of the vector.