Main Page   Class Hierarchy   Compound List   File List   Compound Members  

Edge Class Reference

Represents a directed and weighted edge. More...

#include <edge.h>

Inheritance diagram for Edge:

EdgeWithoutSource RelabeledEdge List of all members.

Public Types

typedef EdgeWeight key_type
 Used by stxxl::ksort in order to sort by weight.


Public Methods

 Edge (NodeID source=0, NodeID target=0, EdgeWeight weight=0)
 The default constructor.

NodeID source () const
 Returns the identifier of the source vertex.

void swap ()
 Swaps the source and the target vertex.

bool isSelfLoop () const
 Returns true iff this Edge is a self loop, i.e.


Static Public Attributes

Edge minWeight ()
 Returns an Edge object with minimum weight.

Edge maxWeight ()
 Returns an Edge object with maximum weight.


Private Attributes

NodeID _source

Friends

bool operator== (const Edge &e1, const Edge &e2)
 Determines if two edges have the same source and the same target vertex.

std::ostream & operator<< (std::ostream &os, const Edge &e)
 Writes a string representation of an Edge to an output stream.


Detailed Description

Represents a directed and weighted edge.

Definition at line 78 of file edge.h.


Member Function Documentation

bool Edge::isSelfLoop   const [inline]
 

Returns true iff this Edge is a self loop, i.e.

the source and the target vertices are identical.

Definition at line 118 of file edge.h.

References source(), and EdgeWithoutSource::target().

Referenced by PQueue::add(), and Buckets< nodesPerBucket >::addToExternalBucket().


The documentation for this class was generated from the following file:
Generated on Thu Aug 14 15:13:28 2003 for External Memory Minimum Spanning Trees by doxygen1.2.17