|
||||||||||
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.
Field Summary |
Fields inherited from class mascoptLib.util.ObservableObject |
stopNotifyValueMechanism |
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 | |
void |
addMissingVertices(AbstractVertexSet avs,
AbstractEdgeSet aes)
This function looks at the endpoints of every AbstractEdge from a given AbstractEdgeSet, check that they belong to a given AbstractVertexSet and if not add them. |
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 |
setSuperGraph(AbstractGraph superGraph)
Sets the supersets. |
Element |
toDOMTree(Element element)
The method writes the current object in the DOMTree. |
String |
toString()
Converts the Graph in string to be printed. |
Methods inherited from class mascoptLib.abstractGraph.MascoptObject |
copyValues, countAllObjects, deleteValue, deleteValue, existValue, existValue, getDOMTagHierarchy, getDOMTagName, 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, toDOMTreeAsRef, 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)
this
or with
setValue
are keep while this others 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 if the
context is not this
.Method Detail |
public String toString()
public abstract AbstractGraphFactory getFactory()
public boolean checkIntegrity()
public AbstractVertexSet getAbstractVertexSet()
public AbstractEdgeSet getAbstractEdgeSet()
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.public void addMissingVertices(AbstractVertexSet avs, AbstractEdgeSet aes)
public Element toDOMTree(Element element)
toDOMTree
in interface MascoptWritableInterface
toDOMTree
in class MascoptObject
element
- the current node of DOM document.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |