com.hp.hpl.guess.layout
Class Physics
java.lang.Object
edu.uci.ics.jung.visualization.AbstractLayout
com.hp.hpl.guess.layout.Physics
- All Implemented Interfaces:
- ChangeEventSupport, Layout, VertexLocationFunction
- public class Physics
- extends AbstractLayout
a port of http://www.schmuhl.org/graphopt/
- Author:
- Hacked by Eytan Adar for Guess
Field Summary |
boolean |
done
|
Method Summary |
void |
advance()
|
void |
advancePositions()
|
boolean |
all_connections_in_lower_layer(Set s,
int layer_number)
|
void |
apply_electrical_force(Node other_node,
Node this_node,
double distance)
|
void |
apply_spring_force(Node other_node,
Node this_node)
|
void |
assign_layers(List nodes)
|
Coordinates |
determine_electric_axal_forces(double directed_force,
double distance,
Node otherN,
Node thisN)
|
Coordinates |
determine_spring_axal_forces(double directed_force,
double distance,
int spring_length,
Node other_node,
Node this_node)
|
double |
distance_between(Node node1,
Node node2)
|
boolean |
every_node_is_in_a_layer(List my_nodes)
|
void |
gather_nodes_with_layer(List my_nodes,
int which_layer)
|
Coordinates |
getCoordinates(Node v)
|
double |
getX(Vertex n)
|
double |
getY(Vertex n)
|
boolean |
incrementsAreDone()
|
void |
initialize_local_vertex(Vertex v)
|
void |
initialize_local()
|
boolean |
isIncremental()
|
void |
move_nodes(List my_nodes)
|
int |
nodes_not_in_lower_layer(Set these_nodes,
int layer_number)
|
void |
seperateNodes(List my_nodes)
|
Methods inherited from class edu.uci.ics.jung.visualization.AbstractLayout |
addChangeListener, applyFilter, dontMove, fireStateChanged, forceMove, getBaseKey, getChangeListeners, getCoordinates, getCurrentSize, getEdge, getEdge, getGraph, getLocation, getStatus, getVertex, getVertex, getVertexIterator, getVisibleEdges, getVisibleVertices, initialize, initialize, lockVertex, removeChangeListener, resize, restart, unlockVertex |
done
public boolean done
Physics
public Physics(Graph g,
boolean gather)
advancePositions
public void advancePositions()
seperateNodes
public void seperateNodes(List my_nodes)
advance
public void advance()
apply_electrical_force
public void apply_electrical_force(Node other_node,
Node this_node,
double distance)
apply_spring_force
public void apply_spring_force(Node other_node,
Node this_node)
move_nodes
public void move_nodes(List my_nodes)
distance_between
public double distance_between(Node node1,
Node node2)
determine_electric_axal_forces
public Coordinates determine_electric_axal_forces(double directed_force,
double distance,
Node otherN,
Node thisN)
determine_spring_axal_forces
public Coordinates determine_spring_axal_forces(double directed_force,
double distance,
int spring_length,
Node other_node,
Node this_node)
assign_layers
public void assign_layers(List nodes)
all_connections_in_lower_layer
public boolean all_connections_in_lower_layer(Set s,
int layer_number)
every_node_is_in_a_layer
public boolean every_node_is_in_a_layer(List my_nodes)
nodes_not_in_lower_layer
public int nodes_not_in_lower_layer(Set these_nodes,
int layer_number)
gather_nodes_with_layer
public void gather_nodes_with_layer(List my_nodes,
int which_layer)
getX
public double getX(Vertex n)
getY
public double getY(Vertex n)
getCoordinates
public Coordinates getCoordinates(Node v)
incrementsAreDone
public boolean incrementsAreDone()
initialize_local_vertex
public void initialize_local_vertex(Vertex v)
initialize_local
public void initialize_local()
isIncremental
public boolean isIncremental()