|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectbcds.phison.multfailures.ElemsSequencerBase<V,E>
bcds.phison.multfailures.SequencerDegree<V,E>
public class SequencerDegree<V,E>
This class arranges nodes in descending order of nodal degree,
optionally shuffling the order of nodes having the same
degree.
It does not implement
ElemsSequencer.arrangeDirectedLinks(java.util.Random)
or
ElemsSequencer.arrangeUndirectedLinks(java.util.Random)
.
Constructor Summary | |
---|---|
SequencerDegree()
Default constructor. |
|
SequencerDegree(TED<V,E> ted,
Environ env)
Creates a new instance and calls setup to complete the initialization. |
Method Summary | ||
---|---|---|
java.util.List<V> |
arrangeNodes(java.util.Random rnd)
Returns all the nodes in the graph sorted by nodal degree, in descending order. |
|
static
|
groupByNodalDegree(SimGraph<V,E> g)
Returns a map where nodes are grouped by their "out" nodal degree. |
Methods inherited from class bcds.phison.multfailures.ElemsSequencerBase |
---|
arrangeDirectedLinks, arrangeUndirectedLinks, getEnviron, getEnvParams, getName, setup |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SequencerDegree()
public SequencerDegree(TED<V,E> ted, Environ env)
Method Detail |
---|
public java.util.List<V> arrangeNodes(java.util.Random rnd)
rnd
is not null,
nodes of the same degree are "shuffled" randomly, so that
successive calls will return different results, but always
observing that d(v_j) >= d(v_k) for all
j,k in [0..N), j < k. If rnd
is null,
nodes are sorted within their respective group by their "natural" order.
arrangeNodes
in interface ElemsSequencer<V,E>
arrangeNodes
in class ElemsSequencerBase<V,E>
public static <V,E> java.util.SortedMap<java.lang.Integer,java.util.List<V>> groupByNodalDegree(SimGraph<V,E> g)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |