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. | |
| void | Restrict () |
| void | Release () |
An updatable edge class.
Definition at line 309 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 REFRESH_UNRESTRICTED or REFRESH_RESTRICTED refresh the edge to have at least the given capacity and also update the respective update timestamp, 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 REFRESH_UNRESTRICTED or REFRESH_RESTRICTED. |
Definition at line 264 of file linkgraph.cpp.
References _date, LinkGraph::BaseEdge::capacity, LinkGraph::EdgeWrapper< BaseEdge >::edge, LinkGraph::BaseEdge::last_restricted_update, LinkGraph::BaseEdge::last_unrestricted_update, max(), LinkGraph::REFRESH_RESTRICTED, LinkGraph::REFRESH_UNRESTRICTED, and LinkGraph::BaseEdge::usage.
1.7.1