|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectbcds.phison.ra.RoutingAlgBase<V,E>
bcds.phison.ra.SWP<V,E>
public class SWP<V,E>
Implements the SWP (Shortest Widest Path) routing algorithm. The implementation is based on the (rather vague) descriptions given in:
a path with the maximum bandwidth among all feasible paths. If there are several such paths, the one with the minimum hop count is selected. If there are several such paths with the same hop count, one is randomly selected.
Unlike what may seem at first, SWP and WSP
are not
simply the opposite of each other.
Note: In this implementation, each call to run()
implies the execution of two "Dijkstra"s.
Constructor Summary | |
---|---|
SWP()
Default constructor. |
|
SWP(TED<V,E> ted,
Environ env)
Creates a new instance and passes the parameters to setup. |
Method Summary | |
---|---|
Path<V,E> |
run(V src,
V dest,
int rq_cap)
Returns a SWP path whose links have residual capacity at least equal to rq_cap . |
Methods inherited from class bcds.phison.ra.RoutingAlgBase |
---|
buildPathFromParentNodes, commitBackupPath, commitWorkingPath, dumpState, getBackupPath, getCost, getEnviron, getEnvParams, getName, getTED, getWorkingPath, offersProtection, setBackupPath, setRequest, setup, 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, getCost, getName, getWorkingPath, offersProtection, setup, topologyHasChanged, uncommitBackupPath, uncommitWorkingPath |
Methods inherited from interface bcds.phison.WithEnvParams |
---|
getEnviron, getEnvParams |
Constructor Detail |
---|
public SWP()
RoutingAlgBase.setup(TED, Environ)
must be called.
public SWP(TED<V,E> ted, Environ env)
env
may be null but the first one must not. No environment parameter
is expected or used by this class.
Method Detail |
---|
public Path<V,E> run(V src, V dest, int rq_cap)
rq_cap
. If more
than one candidate path exists, one of them is chosen arbitrarily.
run
in interface RoutingAlg<V,E>
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |