mascoptLib.graphs
Class DiGraphFactory

java.lang.Object
  extended bymascoptLib.graphs.DiGraphFactory
All Implemented Interfaces:
AbstractGraphFactory

public class DiGraphFactory
extends Object
implements AbstractGraphFactory

The factory to produce digraphs.


Constructor Summary
DiGraphFactory()
           
 
Method Summary
 AbstractGraph newAbstractCopyGraph(AbstractGraph graph, boolean copyElements)
          Constructs a copy of a graph.
 AbstractPath newAbstractCopyPath(AbstractPath chain)
          Constructs a copy of a chain.
 AbstractEdge newAbstractEdge(AbstractVertex n0, AbstractVertex n1)
          Constructs an edge beetween two nodes.
 AbstractEdgeSet newAbstractEdgeSet(AbstractEdgeSet edgeSet)
          Constructs a new edge set which is a sub set of an other edge set.
 AbstractEdgeSet newAbstractEdgeSet(AbstractEdgeSet es, AbstractVertexSet abstractNodeSet)
          Constructs a new edge set which is as sub set of an other edge set and based on a node set.
 AbstractEdgeSet newAbstractEdgeSet(AbstractVertexSet nodeSet)
          Constructs a new edge set based on a node set.
 AbstractGraph newAbstractGraph(AbstractGraph graph)
          Constructs a sub graph of a graph.
 AbstractGraph newAbstractGraph(AbstractVertexSet nodeSet, AbstractEdgeSet edgeSet)
          Constructs a new abstract Graph based on a node set and an edge set.
 AbstractPath newAbstractPath(AbstractEdgeSet edgeSet)
          Constructs a new chain based on a edge set.
 AbstractVertex newAbstractVertex()
          Constructs a node.
 AbstractVertexSet newAbstractVertexSet()
          Default node set constructor.
 AbstractVertexSet newAbstractVertexSet(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

DiGraphFactory

public DiGraphFactory()
Method Detail

newAbstractGraph

public AbstractGraph newAbstractGraph(AbstractVertexSet nodeSet,
                                      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 AbstractGraph newAbstractGraph(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 AbstractGraph newAbstractCopyGraph(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 AbstractVertexSet newAbstractVertexSet()
Default node set constructor.

Specified by:
newAbstractVertexSet in interface AbstractGraphFactory

newAbstractVertexSet

public AbstractVertexSet newAbstractVertexSet(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 AbstractVertex newAbstractVertex()
Constructs a node.

Specified by:
newAbstractVertex in interface AbstractGraphFactory

newAbstractEdgeSet

public AbstractEdgeSet newAbstractEdgeSet(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 AbstractEdgeSet newAbstractEdgeSet(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 AbstractEdgeSet newAbstractEdgeSet(AbstractEdgeSet es,
                                          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 AbstractEdge newAbstractEdge(AbstractVertex n0,
                                    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 AbstractPath newAbstractPath(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 AbstractPath newAbstractCopyPath(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.