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

Represents an undirected edge. More...

#include <dai/weightedgraph.h>

Public Member Functions

 UEdge ()
 Default constructor. More...
 
 UEdge (size_t m1, size_t m2)
 Constructs an undirected edge between m1 and m2. More...
 
 UEdge (const DEdge &e)
 Construct from DEdge. More...
 
bool operator== (const UEdge &x)
 Tests for inequality (disregarding the ordering of the nodes) More...
 
bool operator< (const UEdge &x) const
 Smaller-than operator. More...
 
std::string toString () const
 Formats an undirected edge as a string. More...
 

Public Attributes

size_t first
 First node index. More...
 
size_t second
 Second node index. More...
 

Friends

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

Detailed Description

Represents an undirected edge.

Constructor & Destructor Documentation

dai::UEdge::UEdge ( )
inline

Default constructor.

dai::UEdge::UEdge ( size_t  m1,
size_t  m2 
)
inline

Constructs an undirected edge between m1 and m2.

dai::UEdge::UEdge ( const DEdge e)
inline

Construct from DEdge.

Member Function Documentation

bool dai::UEdge::operator== ( const UEdge x)
inline

Tests for inequality (disregarding the ordering of the nodes)

bool dai::UEdge::operator< ( const UEdge x) const
inline

Smaller-than operator.

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

Formats an undirected edge as a string.

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  os,
const UEdge e 
)
friend

Writes an undirected edge to an output stream.

Member Data Documentation

size_t dai::UEdge::first

First node index.

size_t dai::UEdge::second

Second node index.


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