SMIL  1.0.4
Edge< NodeT, WeightT > Class Template Reference

Non-oriented edge. More...

Detailed Description

template<class NodeT = size_t, class WeightT = size_t>
class smil::Edge< NodeT, WeightT >

Non-oriented edge.

See also
Graph

#include <DGraph.hpp>

+ Collaboration diagram for Edge< NodeT, WeightT >:

Public Types

typedef WeightT WeightType
 

Public Member Functions

 Edge ()
 Default constructor.
 
 Edge (NodeT a, NodeT b, WeightT w=1)
 Constructor using two nodes and an optional weight (default 1).
 
 Edge (const Edge &rhs)
 Copy constructor.
 
Edgeoperator= (const Edge &rhs)
 Copy an edge.
 
bool isActive () const
 Check if the edge is active. More...
 
void desactivate ()
 Deactivate the Edge.
 
bool operator== (const Edge &rhs) const
 
bool operator!= (const Edge &rhs) const
 
bool operator< (const Edge &rhs) const
 
virtual void printSelf (ostream &os=std::cout, string s="") const
 

Public Attributes

NodeT source
 Source node.
 
NodeT target
 Target node.
 
WeightT weight
 Edge weight/value.
 

Member Function Documentation

◆ isActive()

bool isActive ( ) const
inline

Check if the edge is active.

An Edge is considered active if both source and target node indexes are non zero.


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