org.graphstream.ui.layout.springbox
Class EdgeSpring

java.lang.Object
  extended by org.graphstream.ui.layout.springbox.EdgeSpring

public class EdgeSpring
extends Object

Edge representation.


Field Summary
 double attE
          The edge attraction energy.
 String id
          The edge identifier.
 boolean ignored
          Make this edge ignored by the layout algorithm ?.
 NodeParticle node0
          Source node.
 NodeParticle node1
          Target node.
 Vector3 spring
          The attraction force on this edge.
 double weight
          Edge weight.
 
Constructor Summary
EdgeSpring(String id, NodeParticle n0, NodeParticle n1)
          New edge between two given nodes.
 
Method Summary
 void attraction()
          Compute the attraction force on this edge.
 NodeParticle getOpposite(NodeParticle node)
          Considering the two nodes of the edge, return the one that was not given as argument.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

id

public String id
The edge identifier.


node0

public NodeParticle node0
Source node.


node1

public NodeParticle node1
Target node.


weight

public double weight
Edge weight.


spring

public Vector3 spring
The attraction force on this edge.


ignored

public boolean ignored
Make this edge ignored by the layout algorithm ?.


attE

public double attE
The edge attraction energy.

Constructor Detail

EdgeSpring

public EdgeSpring(String id,
                  NodeParticle n0,
                  NodeParticle n1)
New edge between two given nodes.

Parameters:
id - The edge identifier.
n0 - The first node.
n1 - The second node.
Method Detail

getOpposite

public NodeParticle getOpposite(NodeParticle node)
Considering the two nodes of the edge, return the one that was not given as argument.

Parameters:
node - One of the nodes of the edge.
Returns:
The other node.

attraction

public void attraction()
Compute the attraction force on this edge.



Copyright © 2011. All Rights Reserved.