mascoptLib.abstractGraph
Interface AbstractGraphFactory

All Known Implementing Classes:
DiGraphFactory, GraphFactory

public interface AbstractGraphFactory

The factory building Graphs.


Method Summary
 AbstractGraph newAbstractCopyGraph(AbstractGraph graph, boolean copyElements)
          Constructs a copy of a graph.
 AbstractPath newAbstractCopyPath(AbstractPath path)
          Constructs a copy of a path.
 AbstractEdge newAbstractEdge(AbstractVertex x, AbstractVertex y)
          Constructs an edge beetween two vertices.
 AbstractEdgeSet newAbstractEdgeSet(AbstractEdgeSet edgeSet)
          Constructs a new edge set which is a sub set of an other edge set.
 AbstractEdgeSet newAbstractEdgeSet(AbstractEdgeSet es, AbstractVertexSet abstractVertexSet)
          Constructs a new edge set which is as sub set of an other edge set and based on a vertex set.
 AbstractEdgeSet newAbstractEdgeSet(AbstractVertexSet vertexSet)
          Constructs a new edge set based on a vertex set.
 AbstractGraph newAbstractGraph(AbstractGraph graph)
          Constructs a sub graph of a graph.
 AbstractGraph newAbstractGraph(AbstractVertexSet vertexSet, AbstractEdgeSet edgeSet)
          Constructs a new abstract Graph based on a vertex set and an edge set.
 AbstractPath newAbstractPath(AbstractEdgeSet edgeSet)
          Constructs a new path based on a edge set.
 AbstractVertex newAbstractVertex()
          Constructs a vertex.
 AbstractVertexSet newAbstractVertexSet()
          Default vertex set constructor.
 AbstractVertexSet newAbstractVertexSet(AbstractVertexSet vertexSet)
          Constructs a new vertex set based on a vertex set.
 

Method Detail

newAbstractGraph

public AbstractGraph newAbstractGraph(AbstractVertexSet vertexSet,
                                      AbstractEdgeSet edgeSet)
Constructs a new abstract Graph based on a vertex set and an edge set.

Parameters:
vertexSet - the vertex set of the new graph
edgeSet - the edge set of the new graph

newAbstractGraph

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

Parameters:
graph - the father graph of the graph to construct.

newAbstractCopyGraph

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

Parameters:
copyElements - which indicates if the vertices and edges have to be copied. If not, then only the set are duplicated.
graph - the graph to copy.

newAbstractVertexSet

public AbstractVertexSet newAbstractVertexSet()
Default vertex set constructor.


newAbstractVertexSet

public AbstractVertexSet newAbstractVertexSet(AbstractVertexSet vertexSet)
Constructs a new vertex set based on a vertex set.

Parameters:
vertexSet - the vertex set used as base to the vertex set.
Returns:
an abstract vertex set empty.

newAbstractVertex

public AbstractVertex newAbstractVertex()
Constructs a vertex.


newAbstractEdgeSet

public AbstractEdgeSet newAbstractEdgeSet(AbstractVertexSet vertexSet)
Constructs a new edge set based on a vertex set.

Parameters:
vertexSet - the vertex set used as base to the edge set.
Returns:
an abstract edge set empty.

newAbstractEdgeSet

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

Parameters:
edgeSet - the edge set used as base to the edge set.
Returns:
an abstract edge set empty.

newAbstractEdgeSet

public AbstractEdgeSet newAbstractEdgeSet(AbstractEdgeSet es,
                                          AbstractVertexSet abstractVertexSet)
Constructs a new edge set which is as sub set of an other edge set and based on a vertex set. This is the most generic constructor. It permits to use a specific vertex 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.

Parameters:
es - the father edge set.
abstractVertexSet - the base of vertices of the new edge set.
Returns:
an abstract edge set empty.

newAbstractEdge

public AbstractEdge newAbstractEdge(AbstractVertex x,
                                    AbstractVertex y)
Constructs an edge beetween two vertices.

Parameters:
x - the first vertex.
y - the second vertex.
Returns:
the resulting edge.

newAbstractPath

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

Parameters:
edgeSet - the base of the path
Returns:
a empty path.

newAbstractCopyPath

public AbstractPath newAbstractCopyPath(AbstractPath path)
Constructs a copy of a path. This constructor allows to copy a path and all its parts. Vertices and edges are not copied.