class Edge

This class represents an edge in a graph. More...

Definition#include <graph/edge.h>
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

Public Types

Public Methods


Detailed Description

This class represents an edge in a graph.

Vertex&  getOrigin ()

Return the origin of the edge

Vertex&  getTarget ()

Return the target of the edge

int  getCapacity ()

Return the current rest capacity

int  getMaxCapacity ()

Return the maximum capacity of the edge

int  getFlow ()

Return the current flow through the edge

void  addFlow (int flow)

addFlow(int flow) adds the given amount of flow to the edge. An exception is thrown if flow exceeds the remaining capacity.

void  setCapacity (int capacity)

setCapacity(...) changes the capacity of the Edge. If the new capacity is negative the capacity of the edge is set to zero.