org.graffiti.plugins.algorithms.generators
Class ExtendedAdjListGraph

java.lang.Object
  extended by org.graffiti.attributes.AbstractAttributable
      extended by org.graffiti.graph.AbstractGraph
          extended by org.graffiti.graph.AdjListGraph
              extended by org.graffiti.plugins.algorithms.generators.ExtendedAdjListGraph
All Implemented Interfaces:
Attributable, DeepCopy, Graph

public class ExtendedAdjListGraph
extends AdjListGraph

This class extends AdjListGraph. The inserting of edges to a node's internal edge lists is extended. Edges can be inserted at specified positions now relatively to another edge.

Version:
$1.0$ $3.9.2005$
Author:
$Marek Piorkowski$

Constructor Summary
ExtendedAdjListGraph()
          Constructs a new instance of an ExtendedAdjListGraph.
ExtendedAdjListGraph(CollectionAttribute coll)
          Constructs a new instance of an ExtendedAdjListGraph.
ExtendedAdjListGraph(Graph g, ListenerManager listenerManager)
          Constructs a new instance of an ExtendedAdjListGraph from an instance of any Graph implementation.
ExtendedAdjListGraph(Graph g, ListenerManager listenerManager, CollectionAttribute coll)
          Constructs a new instance of an ExtendedAdjListGraph from an instance of any Graph implementation.
ExtendedAdjListGraph(ListenerManager listenerManager)
          Constructs a new instance of an ExtendedAdjListGraph.
ExtendedAdjListGraph(ListenerManager listenerManager, CollectionAttribute coll)
          Constructs a new instance of an ExtendedAdjListGraph.
 
Method Summary
 Edge addEdge(Edge e, Node target, boolean directed, int position)
          Adds an edge x to this graph.
 Edge addEdge(Edge e, Node target, boolean directed, int position, CollectionAttribute col)
          Adds an edge x to this graph.
 Edge createEdge(Node source, Node target, boolean directed, CollectionAttribute col)
          Creates a new ExtendedAdjListEdge that is in the current graph.
 Node createNode(CollectionAttribute col)
          Creates a new ExtendedAdjListNode that is in the current graph.
 Edge face_cycle_succ(ExtendedAdjListEdge e)
          Returns the face cycle successor of the specified ExtendedAdjListEdge.
 
Methods inherited from class org.graffiti.graph.AdjListGraph
copy, getNodesIterator, isModified, setModified, setNodeFirst, setNodeLast
 
Methods inherited from class org.graffiti.graph.AbstractGraph
addAttributeConsumer, addEdge, addEdge, addEdgeCopy, addGraph, addNode, addNode, addNodeCopy, areConnected, clear, containsEdge, containsNode, deleteEdge, deleteNode, getAttTypesManager, getEdges, getEdges, getEdgesIterator, getGraphElements, getListenerManager, getNodes, getNumberOfDirectedEdges, getNumberOfEdges, getNumberOfNodes, getNumberOfUndirectedEdges, isDirected, isEmpty, isUndirected, removeAttributeConsumer, setDirected, setDirected
 
Methods inherited from class org.graffiti.attributes.AbstractAttributable
addAttribute, addBoolean, addByte, addDouble, addFloat, addInteger, addLong, addShort, addString, changeBoolean, changeByte, changeDouble, changeFloat, changeInteger, changeLong, changeShort, changeString, containsAttribute, getAttribute, getAttributes, getBoolean, getByte, getDouble, getFloat, getInteger, getLong, getShort, getString, removeAttribute, setBoolean, setByte, setDouble, setFloat, setInteger, setLong, setShort, setString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.graffiti.graph.Graph
addAttributeConsumer, addEdge, addEdge, addEdgeCopy, addGraph, addNode, addNode, addNodeCopy, clear, containsEdge, containsNode, deleteEdge, deleteNode, getAttTypesManager, getEdges, getEdges, getEdgesIterator, getGraphElements, getNodes, getNumberOfDirectedEdges, getNumberOfEdges, getNumberOfNodes, getNumberOfUndirectedEdges, isDirected, isEmpty, isUndirected, removeAttributeConsumer, setDirected, setDirected
 
Methods inherited from interface org.graffiti.attributes.Attributable
addAttribute, addBoolean, addByte, addDouble, addFloat, addInteger, addLong, addShort, addString, changeBoolean, changeByte, changeDouble, changeFloat, changeInteger, changeLong, changeShort, changeString, containsAttribute, getAttribute, getAttributes, getBoolean, getByte, getDouble, getFloat, getInteger, getListenerManager, getLong, getShort, getString, removeAttribute, setBoolean, setByte, setDouble, setFloat, setInteger, setLong, setShort, setString
 

Constructor Detail

ExtendedAdjListGraph

public ExtendedAdjListGraph()
Constructs a new instance of an ExtendedAdjListGraph. Sets the ListenerManager of the new instance to the default ListenerManager.


ExtendedAdjListGraph

public ExtendedAdjListGraph(CollectionAttribute coll)
Constructs a new instance of an ExtendedAdjListGraph. Sets the ListenerManager of the new instance to the default ListenerManager.

Parameters:
coll - the CollectionAttribute of the currently created AdjListGraph instance.

ExtendedAdjListGraph

public ExtendedAdjListGraph(ListenerManager listenerManager)
Constructs a new instance of an ExtendedAdjListGraph. Sets the ListenerManager of the new instance to the specified one.

Parameters:
listenerManager - listener manager for the graph.

ExtendedAdjListGraph

public ExtendedAdjListGraph(ListenerManager listenerManager,
                            CollectionAttribute coll)
Constructs a new instance of an ExtendedAdjListGraph. Sets the ListenerManager of the new instance to the specified one.

Parameters:
listenerManager - listener manager for the graph.
coll - the CollectionAttribute of the currently created AdjListGraph instance.

ExtendedAdjListGraph

public ExtendedAdjListGraph(Graph g,
                            ListenerManager listenerManager)
Constructs a new instance of an ExtendedAdjListGraph from an instance of any Graph implementation. Copies all nodes and edges from g into the new graph.

Parameters:
g - any Graph implementation out of which an AdjListGraph shall be generated.
listenerManager - listener manager for the graph.

ExtendedAdjListGraph

public ExtendedAdjListGraph(Graph g,
                            ListenerManager listenerManager,
                            CollectionAttribute coll)
Constructs a new instance of an ExtendedAdjListGraph from an instance of any Graph implementation. Copies all nodes and edges from g into the new graph.

Parameters:
g - any Graph implementation out of which an AdjListGraph shall be generated.
listenerManager - listener manager for the graph.
coll - the CollectionAttribute of the currently created AdjListGraph instance.
Method Detail

addEdge

public Edge addEdge(Edge e,
                    Node target,
                    boolean directed,
                    int position)
             throws GraphElementNotFoundException
Adds an edge x to this graph. The source of the edge is the source of the specified edge e and the target is the specified node target. The edge x is inserted before or after edge e in the outgoining edges list of the node 'source(e)' as it is specified in the parameter 'position'.

Parameters:
e - The created edge's source is the source of e.
target - The created edge's target node.
directed - true if the edge shall be directed, false otherwise.
position - The created edge's position in the the outgoing edges list of the node 'source(e)'.
Returns:
A new edge.
Throws:
GraphElementNotFoundException - If any of the nodes cannot be found in the graph.

addEdge

public Edge addEdge(Edge e,
                    Node target,
                    boolean directed,
                    int position,
                    CollectionAttribute col)
             throws GraphElementNotFoundException
Adds an edge x to this graph. The source of the edge is the source of the specified edge e and the target is the specified node target. The edge x is inserted before or after edge e in the outgoining edges list of the node 'source(e)' as it is specified in the parameter 'position'.

Parameters:
e - The created edge's source is the source of e.
target - The created edge's target node.
directed - true if the edge shall be directed, false otherwise.
position - The created edge's position in the the outgoing edges list of the node 'source(e)'.
col - The CollectionAttribute that will be added to the new edge.
Returns:
A new edge.
Throws:
GraphElementNotFoundException - If any of the nodes cannot be found in the graph.

createEdge

public Edge createEdge(Node source,
                       Node target,
                       boolean directed,
                       CollectionAttribute col)
Creates a new ExtendedAdjListEdge that is in the current graph. And initializes it with the given CollectionAttribute .

Specified by:
createEdge in interface Graph
Overrides:
createEdge in class AdjListGraph
Parameters:
source - the source of the edge to add.
target - the target of the edge to add.
directed - true if the edge shall be directed, false otherwise.
col - The CollectionAttribute that will be added to the new edge.
Returns:
the new edge.

createNode

public Node createNode(CollectionAttribute col)
Creates a new ExtendedAdjListNode that is in the current graph. And initializes it with the given CollectionAttribute .

Specified by:
createNode in interface Graph
Overrides:
createNode in class AdjListGraph
Parameters:
col - The CollectionAttribute that will be added to the new edge.
Returns:
the newly created node.

face_cycle_succ

public Edge face_cycle_succ(ExtendedAdjListEdge e)
Returns the face cycle successor of the specified ExtendedAdjListEdge.

Parameters:
e - The specified edge, whose face cycle successor has to be computed.
Returns:
The face cycle successor of the specified ExtendedAdjListEdge.


Generated at 2012-05-30 11:01:25 PM CEST