bcds.phison.multfailures
Class SequencerSpreaders<V,E>
java.lang.Object
bcds.phison.multfailures.ElemsSequencerBase<V,E>
bcds.phison.multfailures.SequencerSpreaders<V,E>
- All Implemented Interfaces:
- ElemsSequencer<V,E>, WithEnvParams
public class SequencerSpreaders<V,E>
- extends ElemsSequencerBase<V,E>
This class arranges nodes in descending order of k-shell index, as a
result of a k-shell decomposition of the graph.
It does not implement
ElemsSequencer.arrangeDirectedLinks(java.util.Random)
or
ElemsSequencer.arrangeUndirectedLinks(java.util.Random)
.
- Author:
- mmanzano
Method Summary |
java.util.List<V> |
arrangeNodes(java.util.Random rnd)
Returns all nodes of the graph sorted by their k-shell index
in descending order. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SequencerSpreaders
public SequencerSpreaders()
- Default constructor.
SequencerSpreaders
public SequencerSpreaders(TED<V,E> ted,
Environ env)
- Creates a new instance and calls setup to complete the
initialization.
arrangeNodes
public java.util.List<V> arrangeNodes(java.util.Random rnd)
- Returns all nodes of the graph sorted by their k-shell index
in descending order. If
rnd
is not null,
nodes of the same k-shell index are "shuffled" randomly, so that
successive calls will return different results, but always
observing that K-shell(v_j) >= K-shell(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.
- Specified by:
arrangeNodes
in interface ElemsSequencer<V,E>
- Overrides:
arrangeNodes
in class ElemsSequencerBase<V,E>