Public Member Functions

LinkGraph::Edge Class Reference

An updatable edge class. More...

#include <linkgraph.h>

Inheritance diagram for LinkGraph::Edge:
LinkGraph::EdgeWrapper< BaseEdge >

Public Member Functions

 Edge (BaseEdge &edge)
 Constructor.
void Update (uint capacity, uint usage)
 Create a new edge or update an existing one.

Detailed Description

An updatable edge class.

Definition at line 277 of file linkgraph.h.


Constructor & Destructor Documentation

LinkGraph::Edge::Edge ( BaseEdge edge  )  [inline]

Constructor.

Parameters:
edge Edge to be wrapped.

Definition at line 283 of file linkgraph.h.


Member Function Documentation

void LinkGraph::Edge::Update ( uint  capacity,
uint  usage 
)

Create a new edge or update an existing one.

If usage is UINT_MAX refresh the edge to have at least the given capacity, otherwise add the capacity.

Parameters:
from Start node of the edge.
to End node of the edge.
capacity Capacity to be added/updated.
usage Usage to be added or UINT_MAX.

Definition at line 219 of file linkgraph.cpp.

References _date, LinkGraph::BaseEdge::capacity, LinkGraph::EdgeWrapper< BaseEdge >::edge, LinkGraph::BaseEdge::last_update, max(), and LinkGraph::BaseEdge::usage.


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