gdl.base
Class NodeWeightCalculator
java.lang.Object
gdl.base.NodeWeightCalculator
public class NodeWeightCalculator
- extends java.lang.Object
This class contains the core algorithm used for the space allocation of nodes of a graph: starting at a focus node, it tracks all connections and in the end calculates the weight of each node, that depends on the amount of children it has in the tree and the childrens sizes.
Of Course the weight of each node is variable and depends on the currently selected focus node, so this weight calculation is performed always a new node is set to the focus.
- Author:
- Martin Suntinger
Method Summary |
void |
calcNodeWeights(int focusNode)
invoke the calculation of all node weights according to a focus node that is passed to the function as an adress value specifying its index in the allNodes LinkedList |
void |
setNodeValues(java.util.LinkedList allNodes,
java.util.LinkedList allNodeIDs,
int[][] adMatrix)
|
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NodeWeightCalculator
public NodeWeightCalculator()
setNodeValues
public void setNodeValues(java.util.LinkedList allNodes,
java.util.LinkedList allNodeIDs,
int[][] adMatrix)
- Parameters:
allNodes
- a List of all nodes, containing ContentNode objectsallNodeIDs
- a List of all Node ids, containing String objectsadMatrix
- the extended adjacence matrix of the graph
calcNodeWeights
public void calcNodeWeights(int focusNode)
- invoke the calculation of all node weights according to a focus node that is passed to the function as an adress value specifying its index in the allNodes LinkedList
- Parameters:
focusNode
- the address of the focus node