mascoptLib.graphs
Class GraphFactory

java.lang.Object
  |
  +--mascoptLib.graphs.GraphFactory
All Implemented Interfaces:
AbstractGraphFactory

public class GraphFactory
extends Object
implements AbstractGraphFactory

The factory to produce Graphs.

Version:
Wed Feb 20 18:37:37 2002
Author:
bbongiov@bing.inria.fr

Constructor Summary
GraphFactory()
           
 
Method Summary
 mascoptLib.abstractGraph.AbstractGraph newAbstractCopyGraph(mascoptLib.abstractGraph.AbstractGraph graph, boolean copyElements)
          Constructs a copy of a graph.
 mascoptLib.abstractGraph.AbstractPath newAbstractCopyPath(mascoptLib.abstractGraph.AbstractPath chain)
          Constructs a copy of a chain.
 mascoptLib.abstractGraph.AbstractEdge newAbstractEdge(mascoptLib.abstractGraph.AbstractVertex n0, mascoptLib.abstractGraph.AbstractVertex n1)
          Constructs an edge beetween two nodes.
 mascoptLib.abstractGraph.AbstractEdgeSet newAbstractEdgeSet(mascoptLib.abstractGraph.AbstractEdgeSet edgeSet)
          Constructs a new edge set which is a sub set of an other edge set.
 mascoptLib.abstractGraph.AbstractEdgeSet newAbstractEdgeSet(mascoptLib.abstractGraph.AbstractEdgeSet es, mascoptLib.abstractGraph.AbstractVertexSet abstractNodeSet)
          Constructs a new edge set which is as sub set of an other edge set and based on a node set.
 mascoptLib.abstractGraph.AbstractEdgeSet newAbstractEdgeSet(mascoptLib.abstractGraph.AbstractVertexSet nodeSet)
          Constructs a new edge set based on a node set.
 mascoptLib.abstractGraph.AbstractGraph newAbstractGraph(mascoptLib.abstractGraph.AbstractGraph graph)
          Constructs a sub graph of a graph.
 mascoptLib.abstractGraph.AbstractGraph newAbstractGraph(mascoptLib.abstractGraph.AbstractVertexSet nodeSet, mascoptLib.abstractGraph.AbstractEdgeSet edgeSet)
          Constructs a new abstract Graph based on a node set and an edge set.
 mascoptLib.abstractGraph.AbstractPath newAbstractPath(mascoptLib.abstractGraph.AbstractEdgeSet edgeSet)
          Constructs a new chain based on a edge set.
 mascoptLib.abstractGraph.AbstractVertex newAbstractVertex()
          Constructs a node.
 mascoptLib.abstractGraph.AbstractVertexSet newAbstractVertexSet()
          Default node set constructor.
 mascoptLib.abstractGraph.AbstractVertexSet newAbstractVertexSet(mascoptLib.abstractGraph.AbstractVertexSet nodeSet)
          Constructs a new node set based on a node set.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GraphFactory

public GraphFactory()
Method Detail

newAbstractGraph

public mascoptLib.abstractGraph.AbstractGraph newAbstractGraph(mascoptLib.abstractGraph.AbstractVertexSet nodeSet,
                                                               mascoptLib.abstractGraph.AbstractEdgeSet edgeSet)
Constructs a new abstract Graph based on a node set and an edge set.

Specified by:
newAbstractGraph in interface AbstractGraphFactory
Parameters:
nodeSet - the node set of the new graph
edgeSet - the edge set of the new graph

newAbstractGraph

public mascoptLib.abstractGraph.AbstractGraph newAbstractGraph(mascoptLib.abstractGraph.AbstractGraph graph)
Constructs a sub graph of a graph. A sub graph is a graph wich node set, respictevely edge set, is included in the original node set, respictevely, in the original edge set. The constructed graph is empty.

Specified by:
newAbstractGraph in interface AbstractGraphFactory
Parameters:
graph - the father graph of the graph to construct.

newAbstractCopyGraph

public mascoptLib.abstractGraph.AbstractGraph newAbstractCopyGraph(mascoptLib.abstractGraph.AbstractGraph graph,
                                                                   boolean copyElements)
Constructs a copy of a graph. This constructor allows to copy a graph and all its parts.

Specified by:
newAbstractCopyGraph in interface AbstractGraphFactory
Parameters:
copyElements - which indicates if the nodes and edges have to be copied. If not, then only the set are duplicated.
graph - the graph to copy.

newAbstractVertexSet

public mascoptLib.abstractGraph.AbstractVertexSet newAbstractVertexSet()
Default node set constructor.

Specified by:
newAbstractVertexSet in interface AbstractGraphFactory

newAbstractVertexSet

public mascoptLib.abstractGraph.AbstractVertexSet newAbstractVertexSet(mascoptLib.abstractGraph.AbstractVertexSet nodeSet)
Constructs a new node set based on a node set.

Specified by:
newAbstractVertexSet in interface AbstractGraphFactory
Parameters:
nodeSet - the node set used as base to the node set.
Returns:
an abstract node set empty.

newAbstractVertex

public mascoptLib.abstractGraph.AbstractVertex newAbstractVertex()
Constructs a node.

Specified by:
newAbstractVertex in interface AbstractGraphFactory

newAbstractEdgeSet

public mascoptLib.abstractGraph.AbstractEdgeSet newAbstractEdgeSet(mascoptLib.abstractGraph.AbstractVertexSet nodeSet)
Constructs a new edge set based on a node set.

Specified by:
newAbstractEdgeSet in interface AbstractGraphFactory
Parameters:
nodeSet - the node set used as base to the edge set.
Returns:
an abstract edge set empty.

newAbstractEdgeSet

public mascoptLib.abstractGraph.AbstractEdgeSet newAbstractEdgeSet(mascoptLib.abstractGraph.AbstractEdgeSet edgeSet)
Constructs a new edge set which is a sub set of an other edge set.

Specified by:
newAbstractEdgeSet in interface AbstractGraphFactory
Parameters:
edgeSet - the edge set used as base to the edge set.
Returns:
an abstract edge set empty.

newAbstractEdgeSet

public mascoptLib.abstractGraph.AbstractEdgeSet newAbstractEdgeSet(mascoptLib.abstractGraph.AbstractEdgeSet es,
                                                                   mascoptLib.abstractGraph.AbstractVertexSet abstractNodeSet)
Constructs a new edge set which is as sub set of an other edge set and based on a node set. This is the most generic constructor. It permits to use a specific node set as the base of the new edge set. Then, it permits to associate the new edge set with an other edge set: the new is a sub set of the other.

Specified by:
newAbstractEdgeSet in interface AbstractGraphFactory
Parameters:
es - the father edge set.
abstractNodeSet - the base of nodes of the new edge set.
Returns:
an abstract edge set empty.

newAbstractEdge

public mascoptLib.abstractGraph.AbstractEdge newAbstractEdge(mascoptLib.abstractGraph.AbstractVertex n0,
                                                             mascoptLib.abstractGraph.AbstractVertex n1)
Constructs an edge beetween two nodes.

Specified by:
newAbstractEdge in interface AbstractGraphFactory
Parameters:
n0 - the first node.
n1 - the second node.
Returns:
the constructed edge.

newAbstractPath

public mascoptLib.abstractGraph.AbstractPath newAbstractPath(mascoptLib.abstractGraph.AbstractEdgeSet edgeSet)
Constructs a new chain based on a edge set. The chain is empty when constructed. Only edges from the edgeSet can be added in the chain. It modelize the fact that the chain is a subgraph of the main graph. Then, use the edge set of the graph to construct new chains.

Specified by:
newAbstractPath in interface AbstractGraphFactory
Parameters:
edgeSet - the base of the chain
Returns:
a empty chain.

newAbstractCopyPath

public mascoptLib.abstractGraph.AbstractPath newAbstractCopyPath(mascoptLib.abstractGraph.AbstractPath chain)
Constructs a copy of a chain. This constructor allows to copy a chain and all its parts. Nodes and edges are not copied.

Specified by:
newAbstractCopyPath in interface AbstractGraphFactory
Parameters:
chain - the chain to copy.