fr.inria.opengve.bridge.algorithms.common
Class CopyGraph<V,E extends Link<V>,G extends Graph<V,E>>

java.lang.Object
  extended by fr.inria.opengve.bridge.algorithms.common.CopyGraph<V,E,G>

public abstract class CopyGraph<V,E extends Link<V>,G extends Graph<V,E>>
extends java.lang.Object

This class is the bridge abstract impelmentation of graph copy. By copy we means that we copy only edgeSet and vertexSet. The vertices and edges are not copied. So vertices and edges are shared between the original and is copy.

Author:
fabrice.peix@sophia.inria.fr

Constructor Summary
CopyGraph()
           
 
Method Summary
 G copyGraph(G g)
          Make a copy of one graph.
protected abstract  HierarchicalSet<E> createEdgeSet(HierarchicalSet<V> vertexSet)
          Create a new empty edgeSet.
protected abstract  G createGraph(HierarchicalSet<E> edgeSet)
          Create a new graph.
protected abstract  HierarchicalSet<E> createSubEdgeSet(HierarchicalSet<E> superSet)
          Create a new empty edgeSet subset of a given edge set.
protected abstract  HierarchicalSet<V> createVertexSet()
          Create a new empty vertexSet.
protected abstract  HierarchicalSet<V> createVertexSet(HierarchicalSet<V> superSet)
          Create a new empty vertexSet subset of a given vertex set.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CopyGraph

public CopyGraph()
Method Detail

createEdgeSet

protected abstract HierarchicalSet<E> createEdgeSet(HierarchicalSet<V> vertexSet)
Create a new empty edgeSet.

Parameters:
vertexSet - The vertex on which the created edgeSet is based.
Returns:
The newly created edgeSet.

createSubEdgeSet

protected abstract HierarchicalSet<E> createSubEdgeSet(HierarchicalSet<E> superSet)
Create a new empty edgeSet subset of a given edge set.

Parameters:
superSet - The super set of the new create one.
Returns:
The newly created edgeSet.

createVertexSet

protected abstract HierarchicalSet<V> createVertexSet()
Create a new empty vertexSet.

Returns:
The newly created vertexSet.

createVertexSet

protected abstract HierarchicalSet<V> createVertexSet(HierarchicalSet<V> superSet)
Create a new empty vertexSet subset of a given vertex set.

Parameters:
superSet - The super set of the new created one.
Returns:
The newly created vertexSet.

copyGraph

public G copyGraph(G g)
Make a copy of one graph. By copy we means that we copy only edgeSet and vertexSet. The vertices and edges are not copied.

Parameters:
g - The graph to copy.
Returns:
The copy of graph g.

createGraph

protected abstract G createGraph(HierarchicalSet<E> edgeSet)
Create a new graph.

Parameters:
edgeSet - The edgeSet of the newly created graph.
Returns:
A newly created graph.


Copyright © 2009 INRIA (Projet Mascotte). All Rights Reserved.