|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectmascoptLib.util.ObservableObject
mascoptLib.abstractGraph.MascoptObject
mascoptLib.abstractGraph.AbstractGraph
The AbstractGraph class constructs a non directed graph using a vertex set and an edge set. It guaranty that, at any time, the AbstractEdgeSet and AbstractVertexSet objects stay coherent. It provides facilities to copy graphs and construct subgraphs. AbstractGraph derives from MascoptObject.
Constructor Summary | |
AbstractGraph()
Default Constructor of the graph. |
|
AbstractGraph(AbstractGraph superGraph)
Constructor of a subgraph. |
|
AbstractGraph(AbstractGraph graph,
boolean copyElements)
Copy all vertices, edges, edge and vertex set of a graph, creating a new graph. |
|
AbstractGraph(AbstractVertexSet abstractVertexSet,
AbstractEdgeSet abstractEdgeSet)
Constructor using a VertexSet and an EdgeSet. |
Method Summary | |
Iterator |
breadthFirstIterator(AbstractVertex root)
Enables the traverse of a graph in a Breadth First way. |
boolean |
checkIntegrity()
Integrity of the graph. |
AbstractGraph |
copyAbstractGraph()
Copy all vertices, edges, edge and vertex set of a graph, creating a new graph. |
static int |
countAllAbstractGraphs()
Count all abstract graphs. |
Iterator |
depthFirstIterator(AbstractVertex root)
Enables the traverse of a graph in a Depth First way. |
void |
free()
Free memory when this object is linked. |
AbstractEdgeSet |
getAbstractEdgeSet()
Returns the edge set of the graph. |
AbstractVertexSet |
getAbstractVertexSet()
Returns the vertex set of the graph. |
abstract AbstractGraphFactory |
getFactory()
Give the factory creating objects not abstract. |
AbstractGraph |
getSuperGraph()
Returns the super set of the object if exists. |
boolean |
isSubGraph()
Says if the object is a subset of an other. |
void |
replace(AbstractVertex vertex,
AbstractGraph g)
Not Implemented . |
void |
replace(AbstractVertex vertex,
AbstractVertexSet vertexSet)
Not Implemented . |
boolean |
setAbstractEdgeSet(AbstractEdgeSet aes)
Change the edge set of the graph. |
boolean |
setAbstractVertexSet(AbstractVertexSet ans)
Change the vertex set of the graph. |
boolean |
setSuperGraph(AbstractGraph superGraph)
Sets the supersets. |
String |
toString()
Converts the Graph in string to be printed. |
Methods inherited from class mascoptLib.abstractGraph.MascoptObject |
copyValues, countAllObjects, deleteValue, deleteValue, existValue, existValue, getDoubleValue, getDoubleValue, getDouValue, getDouValue, getId, getIntegerValue, getIntegerValue, getIntValue, getIntValue, getName, getValue, getValue, getValueContexts, getValueDataType, getValueDataType, getValueEntries, notifyOnValueChange, removeAllValues, setDoubleValue, setDoubleValue, setDouValue, setDouValue, setIntegerValue, setIntegerValue, setIntValue, setIntValue, setName, setValue, setValue, setValue, setValue, setValue, setValue, update |
Methods inherited from class mascoptLib.util.ObservableObject |
addAddObserver, addRemoveObserver, addValueObserver, countAddObservers, countRemoveObservers, countValueObservers, deleteAddObserver, deleteAddObserver, deleteRemoveObserver, deleteRemoveObserver, deleteValueObserver, deleteValueObserver |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public AbstractGraph()
public AbstractGraph(AbstractVertexSet abstractVertexSet, AbstractEdgeSet abstractEdgeSet)
abstractVertexSet
- the vertex set to use when constructing the
graph.abstractEdgeSet
- the edge set to use when constructing the
graph.public AbstractGraph(AbstractGraph superGraph)
superGraph
- the graph used for the construction of the subgraph.public AbstractGraph(AbstractGraph graph, boolean copyElements)
setValue
are lost.
copyElements
- indicates if new vertices and edges have to be
duplicated. If false, the current vertices and edges of the graph are
used and the supersets are preserved. On the contrary, if copyElements
is true
, new vertices and edges are created and you loose
the values stored in it.Method Detail |
public String toString()
public abstract AbstractGraphFactory getFactory()
public boolean checkIntegrity()
public AbstractVertexSet getAbstractVertexSet()
public AbstractEdgeSet getAbstractEdgeSet()
public boolean setAbstractVertexSet(AbstractVertexSet ans)
AbstractGraph
is used since it may be considered strange to change the vertex set of a graph.
Instead a new graph should be created.
public boolean setAbstractEdgeSet(AbstractEdgeSet aes)
public void replace(AbstractVertex vertex, AbstractGraph g)
public void replace(AbstractVertex vertex, AbstractVertexSet vertexSet)
public AbstractGraph copyAbstractGraph()
setValue
are lost.
public void free()
free
in class MascoptObject
public static int countAllAbstractGraphs()
public AbstractGraph getSuperGraph()
public boolean isSubGraph()
public boolean setSuperGraph(AbstractGraph superGraph)
this
is a subset of the AbstractVertexSet (Resp.AbstractEdgeSet) of superSet
.
NO CHECK IS DONE ABOUT AN EVENTUALLY ALREADY EXISTING SUPERGRAPH.
superGraph
- the super graph to use for the graph.public Iterator breadthFirstIterator(AbstractVertex root)
Iterator
, which
will describe the vertices in a breadth first order.
root
- the vertex from which we begin the search.
Iterator
object.public Iterator depthFirstIterator(AbstractVertex root)
Iterator
, which
will describe the vertices in a depth first order.
root
- the vertex from which we begin the search.
Iterator
object.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |