ini.trakem2.analysis
Class Centrality

java.lang.Object
  extended by ini.trakem2.analysis.Centrality

public class Centrality
extends java.lang.Object

Following pseudo-code from: Ulrik Brandes. 2001. A faster algorithm for betweenness centrality. Journal of Mathematical Sociology 25(2):163-177, (2001).


Nested Class Summary
static class Centrality.EtchingStep<T>
          An entry of the number of remaining branch vertices versus the set of branches (each as a List>) removed.
 
Constructor Summary
Centrality()
           
 
Method Summary
static
<T> java.util.ArrayList<Centrality.EtchingStep<T>>
branchWise(java.util.Collection<Vertex<T>> vs_, int etching_multiplier)
           
static
<T> void
compute(java.util.Collection<Vertex<T>> vs)
          Computes betweenness centrality of each vertex in the collection of vertices @param vs where all vertices are part of the same graph.
static
<T> java.util.ArrayList<Vertex<T>>
safeCompute(java.util.Collection<Vertex<T>> vs)
          Like @see compute, but operates on a copy of all Vertex instances, and return a Collection with the same order as @param vs.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Centrality

public Centrality()
Method Detail

safeCompute

public static final <T> java.util.ArrayList<Vertex<T>> safeCompute(java.util.Collection<Vertex<T>> vs)
Like @see compute, but operates on a copy of all Vertex instances, and return a Collection with the same order as @param vs.


compute

public static final <T> void compute(java.util.Collection<Vertex<T>> vs)
Computes betweenness centrality of each vertex in the collection of vertices @param vs where all vertices are part of the same graph. Assumes the internal variables of each Vertex are reset to its initialization values, and that the neighbors array is proper as well. When done, the centrality of each Vertex is set in the homonymous Vertex field.


branchWise

public static final <T> java.util.ArrayList<Centrality.EtchingStep<T>> branchWise(java.util.Collection<Vertex<T>> vs_,
                                                                                  int etching_multiplier)