Class StandardFA2Repulsion<V,R extends StandardFA2Repulsion<V,R,B>,B extends StandardFA2Repulsion.Builder<V,R,B>>
- java.lang.Object
-
- org.jungrapht.visualization.layout.algorithms.repulsion.StandardFA2Repulsion<V,R,B>
-
- Type Parameters:
V
- vertex classR
- repulsion classB
- repulsion builder class
- All Implemented Interfaces:
StandardRepulsion<V,R,B>
- Direct Known Subclasses:
BarnesHutFA2Repulsion
public class StandardFA2Repulsion<V,R extends StandardFA2Repulsion<V,R,B>,B extends StandardFA2Repulsion.Builder<V,R,B>> extends Object implements StandardRepulsion<V,R,B>
Standard implementation of repulsion. We can strongly recommend to use this class only for Graphs with hundreds nodes. Complexity is O(N^2).For large Graphs use BarnesHutFA2Repulsion.
- See Also:
- "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
StandardFA2Repulsion.Builder<V,R extends StandardFA2Repulsion<V,R,B>,B extends StandardFA2Repulsion.Builder<V,R,B>>
-
Field Summary
Fields Modifier and Type Field Description protected static double
epsilon
protected Map<V,Point>
frVertexData
protected Function<V,Point>
initializer
protected double
kr
protected LayoutModel<V>
layoutModel
protected Map<V,Double>
nodeMasses
protected Function<V,Double>
nodeSizes
protected Random
random
protected Set<V>
vertexSet
-
Constructor Summary
Constructors Modifier Constructor Description protected
StandardFA2Repulsion(StandardFA2Repulsion.Builder<V,R,B> builder)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static StandardFA2Repulsion.Builder
builder()
void
calculateRepulsion()
Random
getRandom()
static StandardFA2Repulsion.Builder
standardBuilder()
Deprecated.void
step()
called from the layout algorithm on every step.
-
-
-
Field Detail
-
layoutModel
protected LayoutModel<V> layoutModel
-
random
protected Random random
-
kr
protected double kr
-
epsilon
protected static final double epsilon
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
StandardFA2Repulsion
protected StandardFA2Repulsion(StandardFA2Repulsion.Builder<V,R,B> builder)
-
-
Method Detail
-
builder
public static StandardFA2Repulsion.Builder builder()
-
standardBuilder
@Deprecated public static StandardFA2Repulsion.Builder standardBuilder()
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,R extends StandardFA2Repulsion<V,R,B>,B extends StandardFA2Repulsion.Builder<V,R,B>>
-
getRandom
public Random getRandom()
-
calculateRepulsion
public void calculateRepulsion()
- Specified by:
calculateRepulsion
in interfaceStandardRepulsion<V,R extends StandardFA2Repulsion<V,R,B>,B extends StandardFA2Repulsion.Builder<V,R,B>>
-
-