org.graphstream.ui.layout.springbox
Class NodeParticle

java.lang.Object
  extended by org.miv.pherd.Particle
      extended by org.graphstream.ui.layout.springbox.NodeParticle

public class NodeParticle
extends org.miv.pherd.Particle


Field Summary
 double attE
          Attraction energy for this node only.
 Vector3 disp
          Displacement vector.
 boolean frozen
          Should the node move?.
 double len
          Last computed displacement vector length.
 ArrayList<EdgeSpring> neighbours
          Set of edge connected to this node.
 PrintStream out
          If non null, all this node statistics will be output to this stream.
 double repE
          Repulsion energy for this node only.
 
Constructor Summary
NodeParticle(SpringBox box, String id)
          New node.
NodeParticle(SpringBox box, String id, double x, double y, double z)
          New node at a given position.
 
Method Summary
 Collection<EdgeSpring> getEdges()
          All the edges connected to this node.
 void inserted()
           
 void move(double dx, double dy, double dz)
           
 void move(int time)
           
 void nextStep(int time)
           
 void registerEdge(EdgeSpring e)
          The given edge is connected to this node.
 void removed()
           
 void removeNeighborEdges()
          Remove all edges connected to this node.
 void shake()
          Move the node by a random vector.
 void unregisterEdge(EdgeSpring e)
          The given edge is no more connected to this node.
 
Methods inherited from class org.miv.pherd.Particle
closeTo, closeTo, getAttribute, getAttributeKeyIterator, getCell, getId, getPosition, getWeight, removeAttribute, setAttribute, setCell, setWeight, suicide
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

neighbours

public ArrayList<EdgeSpring> neighbours
Set of edge connected to this node.


frozen

public boolean frozen
Should the node move?.


disp

public Vector3 disp
Displacement vector.


len

public double len
Last computed displacement vector length.


attE

public double attE
Attraction energy for this node only.


repE

public double repE
Repulsion energy for this node only.


out

public PrintStream out
If non null, all this node statistics will be output to this stream.

Constructor Detail

NodeParticle

public NodeParticle(SpringBox box,
                    String id)
New node.

Parameters:
box - The spring box.
id - The node identifier.

NodeParticle

public NodeParticle(SpringBox box,
                    String id,
                    double x,
                    double y,
                    double z)
New node at a given position.

Parameters:
box - The spring box.
id - The node identifier.
x - The abscissa.
y - The ordinate.
z - The depth.
Method Detail

getEdges

public Collection<EdgeSpring> getEdges()
All the edges connected to this node.

Returns:
A set of edges.

move

public void move(int time)
Specified by:
move in class org.miv.pherd.Particle

nextStep

public void nextStep(int time)
Overrides:
nextStep in class org.miv.pherd.Particle

move

public void move(double dx,
                 double dy,
                 double dz)

registerEdge

public void registerEdge(EdgeSpring e)
The given edge is connected to this node.

Parameters:
e - The edge to connect.

unregisterEdge

public void unregisterEdge(EdgeSpring e)
The given edge is no more connected to this node.

Parameters:
e - THe edge to disconnect.

removeNeighborEdges

public void removeNeighborEdges()
Remove all edges connected to this node.


shake

public void shake()
Move the node by a random vector.


inserted

public void inserted()
Specified by:
inserted in class org.miv.pherd.Particle

removed

public void removed()
Specified by:
removed in class org.miv.pherd.Particle


Copyright © 2011. All Rights Reserved.