|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectccvisu.MinimizerBarnesHut.OctTree
private class MinimizerBarnesHut.OctTree
Octtree for graph nodes with positions in 3D space. Contains all graph nodes that are located in a given cuboid in 3D space.
| Field Summary | |
|---|---|
private MinimizerBarnesHut.OctTree[] |
children
Children of this tree node. |
private int |
index
For leafs, the unique index of the graph node; for non-leafs -1. |
private Position |
maxPos
Maximum coordinates of the cuboid in each of the 3 dimensions. |
private Position |
minPos
Minimum coordinates of the cuboid in each of the 3 dimensions. |
private Position |
position
Barycenter of the contained graph nodes. |
private float |
weight
Total weight of the contained graph nodes. |
| Constructor Summary | |
|---|---|
private |
MinimizerBarnesHut.OctTree(int index,
Position position,
float weight,
Position minPos,
Position maxPos)
Creates an octtree containing one graph node. |
| Method Summary | |
|---|---|
private void |
addNode(int nodeIndex,
Position nodePos,
float nodeWeight)
Adds a graph node to the octtree. |
private void |
addNode2(int nodeIndex,
Position nodePos,
float nodeWeight)
Adds a graph node to the octtree, without changing the position and weight of the root. |
private void |
moveNode(Position oldPos,
Position newPos,
float nodeWeight)
Updates the positions of the octtree nodes when the position of a graph node has changed. |
private float |
width()
Returns the maximum extension of the octtree. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private int index
private final MinimizerBarnesHut.OctTree[] children
private Position position
private float weight
private final Position minPos
private final Position maxPos
| Constructor Detail |
|---|
private MinimizerBarnesHut.OctTree(int index,
Position position,
float weight,
Position minPos,
Position maxPos)
index - Unique index of the graph node.position - Position of the graph node.weight - Weight of the graph node.minPos - Minimum coordinates of the cuboid.maxPos - Maximum coordinates of the cuboid.| Method Detail |
|---|
private void addNode(int nodeIndex,
Position nodePos,
float nodeWeight)
nodeIndex - Unique index of the graph node.nodePos - Position of the graph node.nodeWeight - Weight of the graph node.
private void addNode2(int nodeIndex,
Position nodePos,
float nodeWeight)
nodeIndex - Unique index of the graph node.nodePos - Position of the graph node.nodeWeight - Weight of the graph node.
private void moveNode(Position oldPos,
Position newPos,
float nodeWeight)
oldPos - Previous position of the graph node.newPos - New position of the graph node.nodeWeight - Weight of the graph node.private float width()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||