Gephi Toolkit Javadoc

org.gephi.layout.plugin.force.yifanHu
Class YifanHuLayout

java.lang.Object
  extended by org.gephi.layout.plugin.AbstractLayout
      extended by org.gephi.layout.plugin.force.yifanHu.YifanHuLayout
All Implemented Interfaces:
Layout

public class YifanHuLayout
extends AbstractLayout
implements Layout

Hu's basic algorithm

Author:
Helder Suzuki

Nested Class Summary
 class YifanHuLayout.ElectricalForce
          Fr = -C*K*K*(n2-n1)/||n2-n1||
 class YifanHuLayout.SpringForce
          Fa = (n2 - n1) * ||n2 - n1|| / K
 
Field Summary
 
Fields inherited from class org.gephi.layout.plugin.AbstractLayout
dynamicModel, graphModel
 
Constructor Summary
YifanHuLayout(LayoutBuilder layoutBuilder, Displacement displacement)
           
 
Method Summary
 void endAlgo()
          Called when the algorithm is finished (canAlgo() returns false).
 java.lang.Float getBarnesHutTheta()
           
 java.lang.Float getConvergenceThreshold()
           
 java.lang.Float getInitialStep()
           
 java.lang.Float getOptimalDistance()
           
 LayoutProperty[] getProperties()
          The properties for this layout.
 java.lang.Integer getQuadTreeMaxLevel()
           
 java.lang.Float getRelativeStrength()
           
 java.lang.Float getStepRatio()
           
 void goAlgo()
          Run a step in the algorithm, should be called only if canAlgo() returns true.
 void initAlgo()
          initAlgo() is called to initialize the algorithm (prepare to run).
 java.lang.Boolean isAdaptiveCooling()
           
protected  void postAlgo()
           
 void resetPropertiesValues()
          Resets the properties values to the default values.
 void setAdaptiveCooling(java.lang.Boolean adaptiveCooling)
           
 void setBarnesHutTheta(java.lang.Float barnesHutTheta)
           
 void setConvergenceThreshold(java.lang.Float convergenceThreshold)
           
 void setInitialStep(java.lang.Float initialStep)
           
 void setOptimalDistance(java.lang.Float optimalDistance)
           
 void setQuadTreeMaxLevel(java.lang.Integer quadTreeMaxLevel)
           
 void setRelativeStrength(java.lang.Float relativeStrength)
           
 void setStep(java.lang.Float step)
           
 void setStepRatio(java.lang.Float stepRatio)
           
 
Methods inherited from class org.gephi.layout.plugin.AbstractLayout
canAlgo, getBuilder, isConverged, setConverged, setGraphModel
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.gephi.layout.spi.Layout
canAlgo, getBuilder, setGraphModel
 

Constructor Detail

YifanHuLayout

public YifanHuLayout(LayoutBuilder layoutBuilder,
                     Displacement displacement)
Method Detail

postAlgo

protected void postAlgo()

resetPropertiesValues

public void resetPropertiesValues()
Description copied from interface: Layout
Resets the properties values to the default values.

Specified by:
resetPropertiesValues in interface Layout

getProperties

public LayoutProperty[] getProperties()
Description copied from interface: Layout
The properties for this layout.

Specified by:
getProperties in interface Layout
Returns:
the layout properties

initAlgo

public void initAlgo()
Description copied from interface: Layout
initAlgo() is called to initialize the algorithm (prepare to run).

Specified by:
initAlgo in interface Layout

endAlgo

public void endAlgo()
Description copied from interface: Layout
Called when the algorithm is finished (canAlgo() returns false).

Specified by:
endAlgo in interface Layout

goAlgo

public void goAlgo()
Description copied from interface: Layout
Run a step in the algorithm, should be called only if canAlgo() returns true.

Specified by:
goAlgo in interface Layout

getQuadTreeMaxLevel

public java.lang.Integer getQuadTreeMaxLevel()

setQuadTreeMaxLevel

public void setQuadTreeMaxLevel(java.lang.Integer quadTreeMaxLevel)

getBarnesHutTheta

public java.lang.Float getBarnesHutTheta()

setBarnesHutTheta

public void setBarnesHutTheta(java.lang.Float barnesHutTheta)

getOptimalDistance

public java.lang.Float getOptimalDistance()
Returns:
the optimalDistance

setOptimalDistance

public void setOptimalDistance(java.lang.Float optimalDistance)
Parameters:
optimalDistance - the optimalDistance to set

getRelativeStrength

public java.lang.Float getRelativeStrength()
Returns:
the relativeStrength

setRelativeStrength

public void setRelativeStrength(java.lang.Float relativeStrength)
Parameters:
relativeStrength - the relativeStrength to set

setStep

public void setStep(java.lang.Float step)
Parameters:
step - the step to set

isAdaptiveCooling

public java.lang.Boolean isAdaptiveCooling()
Returns:
the adaptiveCooling

setAdaptiveCooling

public void setAdaptiveCooling(java.lang.Boolean adaptiveCooling)
Parameters:
adaptiveCooling - the adaptiveCooling to set

getStepRatio

public java.lang.Float getStepRatio()
Returns:
the stepRatio

setStepRatio

public void setStepRatio(java.lang.Float stepRatio)
Parameters:
stepRatio - the stepRatio to set

getConvergenceThreshold

public java.lang.Float getConvergenceThreshold()
Returns:
the convergenceThreshold

setConvergenceThreshold

public void setConvergenceThreshold(java.lang.Float convergenceThreshold)
Parameters:
convergenceThreshold - the convergenceThreshold to set

getInitialStep

public java.lang.Float getInitialStep()
Returns:
the initialStep

setInitialStep

public void setInitialStep(java.lang.Float initialStep)
Parameters:
initialStep - the initialStep to set

Gephi Toolkit Javadoc