Class StandardFA2Repulsion.Builder<V,R extends StandardFA2Repulsion<V,R,B>,B extends StandardFA2Repulsion.Builder<V,R,B>>
- java.lang.Object
-
- org.jungrapht.visualization.layout.algorithms.repulsion.StandardFA2Repulsion.Builder<V,R,B>
-
- All Implemented Interfaces:
StandardRepulsion.Builder<V,R,B>
- Direct Known Subclasses:
BarnesHutFA2Repulsion.Builder
- Enclosing class:
- StandardFA2Repulsion<V,R extends StandardFA2Repulsion<V,R,B>,B extends StandardFA2Repulsion.Builder<V,R,B>>
public static class StandardFA2Repulsion.Builder<V,R extends StandardFA2Repulsion<V,R,B>,B extends StandardFA2Repulsion.Builder<V,R,B>> extends Object implements StandardRepulsion.Builder<V,R,B>
-
-
Field Summary
Fields Modifier and Type Field Description 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
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description R
build()
B
initializer(Function<V,Point> initializer)
B
layoutModel(LayoutModel<V> layoutModel)
B
nodeData(Map<V,Point> frVertexData)
B
nodeMasses(Map<V,Double> nodeMasses)
Set node masses.B
nodeSizes(Function<V,Double> nodeSizes)
Set node sizes.B
random(Random random)
B
repulsionK(double kr)
Set repulsion K.
-
-
-
Field Detail
-
layoutModel
protected LayoutModel<V> layoutModel
-
random
protected Random random
-
kr
protected double kr
-
-
Method Detail
-
layoutModel
public B layoutModel(LayoutModel<V> layoutModel)
- Specified by:
layoutModel
in interfaceStandardRepulsion.Builder<V,R extends StandardFA2Repulsion<V,R,B>,B extends StandardFA2Repulsion.Builder<V,R,B>>
-
random
public B random(Random random)
- Specified by:
random
in interfaceStandardRepulsion.Builder<V,R extends StandardFA2Repulsion<V,R,B>,B extends StandardFA2Repulsion.Builder<V,R,B>>
-
nodeSizes
public B nodeSizes(Function<V,Double> nodeSizes)
Set node sizes. They may have fixed size or size based on centrality measure or anything else. By default 1.0- Parameters:
nodeSizes
-- Returns:
-
repulsionK
public B repulsionK(double kr)
Set repulsion K. By default 100.0- Parameters:
kr
-- Returns:
-
nodeMasses
public B nodeMasses(Map<V,Double> nodeMasses)
Set node masses. This may have fixed masses or masses based on degrees or anything else. By default node degrees plus one- Parameters:
nodeMasses
-- Returns:
-
build
public R build()
- Specified by:
build
in interfaceStandardRepulsion.Builder<V,R extends StandardFA2Repulsion<V,R,B>,B extends StandardFA2Repulsion.Builder<V,R,B>>
-
-