public class EdgeSpring
extends java.lang.Object
This is mainly used to store data about an edge, all the computation is done in the node particle.
Modifier and Type | Field and Description |
---|---|
double |
attE
The edge attraction energy.
|
java.lang.String |
id
The edge identifier.
|
boolean |
ignored
Make this edge ignored by the layout algorithm ?.
|
NodeParticle |
node0
Source node.
|
NodeParticle |
node1
Target node.
|
Point3 |
spring
The attraction force on this edge.
|
double |
weight
Edge weight.
|
Constructor and Description |
---|
EdgeSpring(java.lang.String id,
NodeParticle n0,
NodeParticle n1)
New edge between two given nodes.
|
Modifier and Type | Method and Description |
---|---|
NodeParticle |
getOpposite(NodeParticle node)
Considering the two nodes of the edge, return the one that was not given as
argument.
|
public java.lang.String id
public NodeParticle node0
public NodeParticle node1
public double weight
public Point3 spring
public boolean ignored
public double attE
public EdgeSpring(java.lang.String id, NodeParticle n0, NodeParticle n1)
id
- The edge identifier.n0
- The first node.n1
- The second node.public NodeParticle getOpposite(NodeParticle node)
node
- One of the nodes of the edge.