jdsl.extension.LEDA.Layout
Class RandomGraphLayout
java.lang.Object
|
+--jdsl.extension.LEDA.Layout.DefaultGraphLayout
|
+--jdsl.extension.LEDA.Layout.RandomGraphLayout
- public class RandomGraphLayout
- extends DefaultGraphLayout
- implements java.lang.Cloneable, GraphLayout
RandomGraphLayout provides a class
for graph layout algorithms.
All vertices are set on random positions.
Coordinates are choosen from [-200, 200] x [-200, 200].
|
Method Summary |
void |
calculation(java.util.Enumeration objects)
Calculate a layout based on a Vertex enumeration. |
void |
calculation(jdsl.graph.api.InspectableGraph graph)
Calculate a layout based on given graph graph. |
java.lang.Object |
clone()
Creates and returns a copy of this object. |
| Methods inherited from class jdsl.extension.LEDA.Layout.DefaultGraphLayout |
calculation,
clearLayout,
getPosition,
getPosition,
merge,
merge,
setEdgeAsStraightLine,
setPosition,
setPosition,
setX,
setY,
update,
update |
| Methods inherited from class java.lang.Object |
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
RandomGraphLayout
public RandomGraphLayout()
- Empty constructor.
RandomGraphLayout
public RandomGraphLayout(RandomGraphLayout other)
- A Copy-Constructor.
- Parameters:
other - given layout to copy
clone
public java.lang.Object clone()
- Creates and returns a copy of this object.
- Returns:
- a clone of this instance.
- Throws:
- OutOfMemoryError - if there is not enough memory
- Overrides:
- clone in class DefaultGraphLayout
- See Also:
Cloneable
calculation
public void calculation(jdsl.graph.api.InspectableGraph graph)
- Calculate a layout based on given graph
graph.
Here all vertices are place on random positions and
all edges are representated as straight lines.
- Specified by:
- calculation in interface GraphLayout
- Parameters:
graph - given graph- Overrides:
- calculation in class DefaultGraphLayout
calculation
public void calculation(java.util.Enumeration objects)
- Calculate a layout based on a
Vertex enumeration.
Here all vertices are place on random positions and
all edges are representated as straight lines.
Only Vertices are respected.
- Specified by:
- calculation in interface GraphLayout
- Parameters:
vertices - given Vertex enumeration- Overrides:
- calculation in class DefaultGraphLayout