bcds.phison.ra
Class MinHop<V,E>
java.lang.Object
bcds.phison.ra.RoutingAlgBase<V,E>
bcds.phison.ra.DijkstraAll<V,E>
bcds.phison.ra.MinHop<V,E>
- All Implemented Interfaces:
- RoutingAlg<V,E>, WithEnvParams
public class MinHop<V,E>
- extends DijkstraAll<V,E>
- implements RoutingAlg<V,E>
Implements Dijkstra-based min-hop routing.
The cost map of the TED object is ignored, as the
link cost is always the constant 1.0.
An example of instantiate this class is:
TED<V, E> ted
= new TED<V, E>(graph, MapToConst.make(graph.edgeSet(), 1), null);
MinHop<V, E> = new MinHop<V, E>(ted, null);
...
- Author:
- Juan Segovia S.
Constructor Summary |
MinHop()
Default constructor. |
MinHop(TED<V,E> ted,
Environ env)
Creates a new instance and passes the parameters to
setup. |
Method Summary |
double |
getCost(E e)
Returns the constant 1.0 for any and all values of e . |
Methods inherited from class bcds.phison.ra.DijkstraAll |
dumpEvalEdgeState, evalEdge, filterGraph, generalizedDijkstra, getParent, getTotalCost, getVisitSequence, initialize, obtain, obtain, outgoingEdgesOf, run, runAll, setup |
Methods inherited from class bcds.phison.ra.RoutingAlgBase |
buildPathFromParentNodes, commitBackupPath, commitWorkingPath, dumpState, getBackupPath, getEnviron, getEnvParams, getName, getTED, getWorkingPath, offersProtection, setBackupPath, setRequest, setWorkingPath, topologyHasChanged, uncommitBackupPath, uncommitWorkingPath |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface bcds.phison.ra.RoutingAlg |
commitBackupPath, commitWorkingPath, dumpState, getBackupPath, getName, getWorkingPath, offersProtection, run, setup, topologyHasChanged, uncommitBackupPath, uncommitWorkingPath |
MinHop
public MinHop()
- Default constructor. To complete the initialization,
DijkstraAll.setup(TED, Environ)
must be called.
MinHop
public MinHop(TED<V,E> ted,
Environ env)
- Creates a new instance and passes the parameters to
setup.
getCost
public double getCost(E e)
- Returns the constant 1.0 for any and all values of
e
.
- Specified by:
getCost
in interface RoutingAlg<V,E>
- Overrides:
getCost
in class RoutingAlgBase<V,E>