Open
Graph Drawing
Framework

 v.2012.07
 

ogdf::DPoint Class Reference

Real points. More...

#include <ogdf/basic/geometry.h>

+ Inheritance diagram for ogdf::DPoint:

List of all members.

Public Member Functions

 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.

Additional Inherited Members

- Public Types inherited from ogdf::GenericPoint< double >
typedef double numberType
 The type for coordinates of the point.
- Public Attributes inherited from ogdf::GenericPoint< double >
double m_x
 The x-coordinate.
double m_y
 The y-coordinate.

Detailed Description

Real points.

This class represent a two-dimensional point with real coordinates.

Definition at line 228 of file geometry.h.


Constructor & Destructor Documentation

ogdf::DPoint::DPoint ( )
inline

Creates a real point (0,0).

Definition at line 232 of file geometry.h.

ogdf::DPoint::DPoint ( double  x,
double  y 
)
inline

Creates a real point (x,y).

Definition at line 235 of file geometry.h.

ogdf::DPoint::DPoint ( const DPoint dp)
inline

Copy constructor.

Definition at line 238 of file geometry.h.


Member Function Documentation

double ogdf::DPoint::distance ( const DPoint p) const

Returns the euclidean distance between p and this point.

double ogdf::DPoint::norm ( ) const
inline

Returns the norm of the point.

Definition at line 246 of file geometry.h.

DPoint ogdf::DPoint::operator+ ( const DPoint p) const

Addition of real points.

DPoint ogdf::DPoint::operator- ( const DPoint p) const

Subtraction of real points.

bool ogdf::DPoint::operator== ( const DPoint dp) const
inline

Relaxed equality operator.

Definition at line 241 of file geometry.h.


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