Vectors with real coordinates. More...
#include <ogdf/basic/geometry.h>
Inheritance diagram for ogdf::DVector:Public Member Functions | |
| DVector () | |
| Creates a vector (0,0). More... | |
| DVector (double x, double y) | |
Creates a vector (x,y). More... | |
| DVector (const DVector &dv) | |
| Copy constructor. More... | |
| DVector (const DPoint &dv) | |
| Copy constructor from DPoint. More... | |
| double | length () const |
| Returns the length of the vector. More... | |
| DVector | operator* (const double val) const |
Multiplies all coordinates with val. More... | |
| double | operator* (const DVector &dv) const |
Returns the scalar product of this vecor and dv. More... | |
| DVector | operator+ (const DVector &dv) const |
| Addition of vectors. More... | |
| DVector | operator- (const DVector &dv) const |
| Subtraction of vectors. More... | |
| DVector | operator/ (const double val) const |
Divides all coordinates by val. More... | |
| DVector | operator= (const DPoint &ip) |
| Assignment operator. More... | |
| double | operator^ (const DVector &dv) const |
| Returns the determinante of the vector. More... | |
| DVector | orthogonal () const |
| Returns a vector that is orthogonal to this vector. More... | |
Public Member Functions inherited from ogdf::DPoint | |
| DPoint () | |
| Creates a real point (0,0). More... | |
| DPoint (double x, double y) | |
Creates a real point (x,y). More... | |
| DPoint (const DPoint &dp) | |
| Copy constructor. More... | |
| double | distance (const DPoint &p) const |
Returns the euclidean distance between p and this point. More... | |
| double | norm () const |
| Returns the norm of the point. More... | |
| DPoint & | operator*= (double c) |
| DPoint | operator+ (const DPoint &p) const |
| Addition of real points. More... | |
| DPoint & | operator+= (const DPoint &p) |
| DPoint | operator- (const DPoint &p) const |
| Subtraction of real points. More... | |
| DPoint & | operator-= (const DPoint &p) |
| DPoint & | operator/= (double c) |
| bool | operator== (const DPoint &dp) const |
| Relaxed equality operator. More... | |
Public Member Functions inherited from ogdf::GenericPoint< double > | |
| GenericPoint () | |
| Creates a generic point. More... | |
| GenericPoint (double x, double y) | |
Creates a generic point (x,y). More... | |
| GenericPoint (const GenericPoint &p) | |
| Copy constructor. More... | |
| double | angle (GenericPoint q, GenericPoint r) const |
| Compute angle (in radians) between vectors. More... | |
| double | angleDegrees (GenericPoint q, GenericPoint r) const |
| Compute angle (in degrees) between vectors. More... | |
| bool | operator!= (const GenericPoint &p) const |
| Inequality operator. More... | |
| bool | operator< (const GenericPoint &p) |
| GenericPoint & | operator= (const GenericPoint &p) |
| Assignment operator. More... | |
| bool | operator== (const GenericPoint &p) const |
| Equality operator. More... | |
| bool | operator> (const GenericPoint &p) |
Additional Inherited Members | |
Public Types inherited from ogdf::GenericPoint< double > | |
| using | numberType = double |
| The type for coordinates of the point. More... | |
Public Attributes inherited from ogdf::GenericPoint< double > | |
| double | m_x |
| The x-coordinate. More... | |
| double | m_y |
| The y-coordinate. More... | |
Vectors with real coordinates.
Definition at line 286 of file geometry.h.
|
inline |
Creates a vector (0,0).
Definition at line 290 of file geometry.h.
|
inline |
Creates a vector (x,y).
Definition at line 293 of file geometry.h.
|
inline |
Copy constructor.
Definition at line 296 of file geometry.h.
|
inline |
Copy constructor from DPoint.
Definition at line 299 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 double | val | ) | const |
Divides all coordinates by val.
Assignment operator.
Definition at line 302 of file geometry.h.
| double ogdf::DVector::operator^ | ( | const DVector & | dv | ) | const |
Returns the determinante of the vector.
| DVector ogdf::DVector::orthogonal | ( | ) | const |
Returns a vector that is orthogonal to this vector.
Returns the vector (y/x,1) if x != 0, or (1,0) otherwise, where (x,y) is this vector.