Class BarnesHut.Builder

  • Enclosing class:
    BarnesHut

    public static class BarnesHut.Builder
    extends java.lang.Object
    • Constructor Detail

      • Builder

        public Builder()
    • Method Detail

      • withGravitationalConstant

        public BarnesHut.Builder withGravitationalConstant​(java.lang.Double gravitationalConstant)
        Gravity attracts. Notice that value should be negative. If you want the repulsion to be stronger, decrease the value. Default value is -2000
      • withCentralGravity

        public BarnesHut.Builder withCentralGravity​(java.lang.Double centralGravity)
        Central gravity attractor to pull the network to center. Default value is 0.3
      • withSpringLength

        public BarnesHut.Builder withSpringLength​(java.lang.Double springLength)
        Edge is represented by springs. THe springLength is the length of the spring. Default value is 95
      • withSpringConstant

        public BarnesHut.Builder withSpringConstant​(java.lang.Double springConstant)
        Indicates how strongly the spring is. Default value is 0.04
      • withDamping

        public BarnesHut.Builder withDamping​(java.lang.Double damping)
        Accepted range [0..1]. Indicates how much the previous physics simulation carries over the next iteration. Default value is 0.09
      • withAvoidOverlap

        public BarnesHut.Builder withAvoidOverlap​(java.lang.Double avoidOverlap)
        Accepted range [0..1]. When provided value is larger than 0 then the size of a node is taken into account. Default value is 0