dai::DEdge Class Reference

Represents a directed edge. More...

#include <dai/weightedgraph.h>

List of all members.

Public Member Functions

 DEdge ()
 Default constructor.
 DEdge (size_t m1, size_t m2)
 Constructs a directed edge pointing from m1 to m2.
bool operator== (const DEdge &x) const
 Tests for equality.
bool operator< (const DEdge &x) const
 Smaller-than operator (performs lexicographical comparison).

Public Attributes

union {
   size_t   first
   size_t   n1
}; 
 First node index (source of edge).
union {
   size_t   second
   size_t   n2
}; 
 Second node index (target of edge).

Friends

std::ostream & operator<< (std::ostream &os, const DEdge &e)
 Writes a directed edge to an output stream.

Detailed Description

Represents a directed edge.


Constructor & Destructor Documentation

dai::DEdge::DEdge (  )  [inline]

Default constructor.

dai::DEdge::DEdge ( size_t  m1,
size_t  m2 
) [inline]

Constructs a directed edge pointing from m1 to m2.


Member Function Documentation

bool dai::DEdge::operator== ( const DEdge x  )  const [inline]

Tests for equality.

bool dai::DEdge::operator< ( const DEdge x  )  const [inline]

Smaller-than operator (performs lexicographical comparison).


Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  os,
const DEdge e 
) [friend]

Writes a directed edge to an output stream.


Member Data Documentation

Deprecated:
Please use member dai::DEdge::first instead
union { ... }

First node index (source of edge).

Deprecated:
Please use member dai::DEdge::second instead
union { ... }

Second node index (target of edge).


The documentation for this class was generated from the following file:
Generated on Sun May 9 16:51:38 2010 for libDAI by  doxygen 1.6.3