|
||||||||||
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.SequencerBC<V,E>
public class SequencerBC<V,E>
This class arranges nodes and links in descending order of betweenness
centrality (BC), optionally shuffling the order of nodes having the same
degree.
BrandesBC
is used in order to calculate the BC. The
non-normalized version of the algorithm is considered here.
Note: in order to consider the graph as weighted the environment must contain:
BrandesBC.weighted=true
Constructor Summary | |
---|---|
SequencerBC()
Default constructor. |
|
SequencerBC(TED<V,E> ted,
Environ env)
Creates a new instance and calls setup to complete the initialization. |
Method Summary | ||
---|---|---|
java.util.List<E> |
arrangeDirectedLinks(java.util.Random rnd)
Returns all the links of the graph, which is considered directed, sorted by their betweenness centrality in descending order. |
|
java.util.List<E> |
arrangeLinks(java.util.Random rnd,
boolean directed)
|
|
java.util.List<V> |
arrangeNodes(java.util.Random rnd)
Returns all nodes of the graph sorted by their betweenness centrality in descending order. |
|
java.util.List<E> |
arrangeUndirectedLinks(java.util.Random rnd)
Returns all the links of the graph, which is considered undirected, sorted by their betweenness centrality in descending order. |
|
static
|
groupLinksByBC(java.util.Map<E,java.lang.Long> bc_links)
Groups by the links BC (the value is previously trunked). |
|
static
|
groupNodesByBC(java.util.Map<V,java.lang.Long> bc_nodes)
Groups by the nodes BC (the value is previously trunked). |
Methods inherited from class bcds.phison.multfailures.ElemsSequencerBase |
---|
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 SequencerBC()
public SequencerBC(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 BC are "shuffled" randomly, so that
successive calls will return different results, but always
observing that BC(v_j) >= BC(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.Long,java.util.List<V>> groupNodesByBC(java.util.Map<V,java.lang.Long> bc_nodes)
public java.util.List<E> arrangeUndirectedLinks(java.util.Random rnd)
rnd
is not null,
links of the same BC are "shuffled" randomly, so that
successive calls will return different results, but always
observing that BC(l_j) >= BC(l_k) for all
j,k in [0..N), j < k. If rnd
is null,
links are sorted within their respective group by their "natural" order.
arrangeUndirectedLinks
in interface ElemsSequencer<V,E>
arrangeUndirectedLinks
in class ElemsSequencerBase<V,E>
public java.util.List<E> arrangeDirectedLinks(java.util.Random rnd)
rnd
is not null,
links of the same BC are "shuffled" randomly, so that
successive calls will return different results, but always
observing that BC(l_j) >= BC(l_k) for all
j,k in [0..N), j < k. If rnd
is null,
links are sorted within their respective group by their "natural" order.
arrangeDirectedLinks
in interface ElemsSequencer<V,E>
arrangeDirectedLinks
in class ElemsSequencerBase<V,E>
public java.util.List<E> arrangeLinks(java.util.Random rnd, boolean directed)
public static <V,E> java.util.SortedMap<java.lang.Long,java.util.List<E>> groupLinksByBC(java.util.Map<E,java.lang.Long> bc_links)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |