libDAI
Public Member Functions | Public Attributes | Friends | List of all members
dai::DEdge Class Reference

Represents a directed edge. More...

#include <dai/weightedgraph.h>

Public Member Functions

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

Public Attributes

size_t first
 First node index (source of edge) More...
 
size_t second
 Second node index (target of edge) More...
 

Friends

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

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)

std::string dai::DEdge::toString ( ) const
inline

Formats a directed edge as a string.

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

size_t dai::DEdge::first

First node index (source of edge)

size_t dai::DEdge::second

Second node index (target of edge)


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