An updatable edge class. More...
#include <linkgraph.h>
Public Member Functions | |
Edge (BaseEdge &edge) | |
Constructor. | |
void | Update (uint capacity, uint usage) |
Create a new edge or update an existing one. |
An updatable edge class.
Definition at line 277 of file linkgraph.h.
LinkGraph::Edge::Edge | ( | BaseEdge & | edge | ) | [inline] |
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.
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.