Class BarnesHutFA2Repulsion<V>
- java.lang.Object
-
- org.jungrapht.visualization.layout.algorithms.repulsion.StandardFA2Repulsion<V,BarnesHutFA2Repulsion<V>,BarnesHutFA2Repulsion.Builder<V>>
-
- org.jungrapht.visualization.layout.algorithms.repulsion.BarnesHutFA2Repulsion<V>
-
- Type Parameters:
V
-
- All Implemented Interfaces:
BarnesHutRepulsion<V,BarnesHutFA2Repulsion<V>,BarnesHutFA2Repulsion.Builder<V>>
,StandardRepulsion<V,BarnesHutFA2Repulsion<V>,BarnesHutFA2Repulsion.Builder<V>>
public class BarnesHutFA2Repulsion<V> extends StandardFA2Repulsion<V,BarnesHutFA2Repulsion<V>,BarnesHutFA2Repulsion.Builder<V>> implements BarnesHutRepulsion<V,BarnesHutFA2Repulsion<V>,BarnesHutFA2Repulsion.Builder<V>>
Implementation of repulsion based on Barnes-Hut approximation. Recommended for large Graphs. Complexity is O(N*log(N)).- See Also:
- "https://en.wikipedia.org/wiki/Barnes%E2%80%93Hut_simulation", "ForceAtlas2, a Continuous Graph Layout Algorithm for Handy Network Visualization Designed for the Gephi Software", "https://journals.plos.org/plosone/article?id=10.1371/journal.pone.0098679"
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
BarnesHutFA2Repulsion.Builder<V>
-
Field Summary
-
Fields inherited from class org.jungrapht.visualization.layout.algorithms.repulsion.StandardFA2Repulsion
epsilon, frVertexData, initializer, kr, layoutModel, nodeMasses, nodeSizes, random, vertexSet
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
BarnesHutFA2Repulsion(BarnesHutFA2Repulsion.Builder<V> builder)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static BarnesHutFA2Repulsion.Builder
barnesHutBuilder()
Deprecated.static BarnesHutFA2Repulsion.Builder
builder()
void
calculateRepulsion()
void
step()
called from the layout algorithm on every step.-
Methods inherited from class org.jungrapht.visualization.layout.algorithms.repulsion.StandardFA2Repulsion
getRandom, standardBuilder
-
-
-
-
Constructor Detail
-
BarnesHutFA2Repulsion
protected BarnesHutFA2Repulsion(BarnesHutFA2Repulsion.Builder<V> builder)
-
-
Method Detail
-
builder
public static BarnesHutFA2Repulsion.Builder builder()
-
barnesHutBuilder
@Deprecated public static BarnesHutFA2Repulsion.Builder barnesHutBuilder()
Deprecated.
-
step
public void step()
Description copied from interface:StandardRepulsion
called from the layout algorithm on every step. this version is a noop but the subclass BarnesHut version rebuilds the tree on every step- Specified by:
step
in interfaceStandardRepulsion<V,BarnesHutFA2Repulsion<V>,BarnesHutFA2Repulsion.Builder<V>>
- Overrides:
step
in classStandardFA2Repulsion<V,BarnesHutFA2Repulsion<V>,BarnesHutFA2Repulsion.Builder<V>>
-
calculateRepulsion
public void calculateRepulsion()
- Specified by:
calculateRepulsion
in interfaceStandardRepulsion<V,BarnesHutFA2Repulsion<V>,BarnesHutFA2Repulsion.Builder<V>>
- Overrides:
calculateRepulsion
in classStandardFA2Repulsion<V,BarnesHutFA2Repulsion<V>,BarnesHutFA2Repulsion.Builder<V>>
-
-