Main Page | Modules | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

Arak::Coloring::Edge Class Reference

#include <coloring.hpp>

Inheritance diagram for Arak::Coloring::Edge:

Inheritance graph
[legend]
Collaboration diagram for Arak::Coloring::Edge:

Collaboration graph
[legend]
List of all members.

Detailed Description

An edge joins two vertices.

If the edge does not lie on the boundary of the colored region, then it is "interior", and its associated line segment represents a color discontinuity; if it lies on the boundary, then it does not. Two interior edges may not "cross", in that if they intersect, they must intersect at a point that is a vertex of both segments.

Definition at line 582 of file coloring.hpp.

Public Member Functions

 Edge ()
 Default constructor.

const Geometry::Segmentsegment () const
 Returns a segment representation of the edge.

VertexHandle getPrevVertex ()
 Returns a reference to the previous vertex incident to this edge (for some ordering of the path's vertices).

const VertexHandle getPrevVertex () const
VertexHandle getNextVertex ()
 Returns a reference to the next vertex incident to this edge (for some ordering of the path's vertices).

const VertexHandle getNextVertex () const
Geometry::Point randomPoint (Arak::Util::Random &random=Arak::Util::default_random) const
 Returns a point sampled uniformly at random from the edge.

double length () const
 Returns the length of this edge.

bool operator== (const Edge &other) const
 Two edges are equal if they are identically the same object.

bool operator!= (const Edge &other) const
 Two edges are unequal if they are not identically the same object.


Protected Attributes

VertexHandle prevVertex
 A pointer to the previous vertex incident to this edge (for some ordering of the path's vertices).

VertexHandle nextVertex
 A pointer to the next vertex incident to this edge (for some ordering of the path's vertices).

int index
 The index of this edge in the random access vectors.


Friends

class Vertex
class Coloring


Constructor & Destructor Documentation

Arak::Coloring::Edge::Edge  )  [inline]
 

Default constructor.

Definition at line 615 of file coloring.hpp.


Member Function Documentation

const VertexHandle Arak::Coloring::Edge::getNextVertex  )  const [inline]
 

Definition at line 636 of file coloring.hpp.

References Arak::Coloring::VertexHandle.

VertexHandle Arak::Coloring::Edge::getNextVertex  )  [inline]
 

Returns a reference to the next vertex incident to this edge (for some ordering of the path's vertices).

Definition at line 635 of file coloring.hpp.

References Arak::Coloring::VertexHandle.

const VertexHandle Arak::Coloring::Edge::getPrevVertex  )  const [inline]
 

Definition at line 629 of file coloring.hpp.

References Arak::Coloring::VertexHandle.

VertexHandle Arak::Coloring::Edge::getPrevVertex  )  [inline]
 

Returns a reference to the previous vertex incident to this edge (for some ordering of the path's vertices).

Definition at line 628 of file coloring.hpp.

References Arak::Coloring::VertexHandle.

double Arak::Coloring::Edge::length  )  const [inline]
 

Returns the length of this edge.

Returns:
the length of this edge

Definition at line 655 of file coloring.hpp.

bool Arak::Coloring::Edge::operator!= const Edge other  )  const [inline]
 

Two edges are unequal if they are not identically the same object.

Definition at line 671 of file coloring.hpp.

bool Arak::Coloring::Edge::operator== const Edge other  )  const [inline]
 

Two edges are equal if they are identically the same object.

Definition at line 663 of file coloring.hpp.

Geometry::Point Coloring::Edge::randomPoint Arak::Util::Random random = Arak::Util::default_random  )  const
 

Returns a point sampled uniformly at random from the edge.

If exact geometric constructions are not supported, then this point may not lie exactly on this segment. Note that for short edges, it is possible that one of the endpoints is returned.

Parameters:
random a source of pseudorandomness
Returns:
a random point in the closure of the edge

Reimplemented in Arak::Coloring::BoundaryEdge.

Definition at line 48 of file coloring.cpp.

References Arak::Geometry::Point, and Arak::Util::Random::uniform().

const Geometry::Segment& Arak::Coloring::Edge::segment  )  const [inline]
 

Returns a segment representation of the edge.

Definition at line 622 of file coloring.hpp.

References Arak::Geometry::Segment.


Friends And Related Function Documentation

friend class Coloring [friend]
 

Reimplemented in Arak::Coloring::InteriorEdge, and Arak::Coloring::BoundaryEdge.

Definition at line 585 of file coloring.hpp.

friend class Vertex [friend]
 

Reimplemented in Arak::Coloring::InteriorEdge, and Arak::Coloring::BoundaryEdge.

Definition at line 584 of file coloring.hpp.


Member Data Documentation

int Arak::Coloring::Edge::index [protected]
 

The index of this edge in the random access vectors.

If this edge is of type INTERIOR, then this its index in interiorEdges; if this edge is of type BOUNDARY, then this is its index in boundaryEdges. If this vertex is of type INVALID then this is -1.

Definition at line 608 of file coloring.hpp.

VertexHandle Arak::Coloring::Edge::nextVertex [protected]
 

A pointer to the next vertex incident to this edge (for some ordering of the path's vertices).

Definition at line 599 of file coloring.hpp.

VertexHandle Arak::Coloring::Edge::prevVertex [protected]
 

A pointer to the previous vertex incident to this edge (for some ordering of the path's vertices).

Definition at line 593 of file coloring.hpp.


The documentation for this class was generated from the following files:
Generated on Wed May 25 14:41:01 2005 for Arak by doxygen 1.3.6