mascoptLib.graphs
Class EdgeSet

java.lang.Object
  |
  +--mascoptLib.util.ObservableObject
        |
        +--mascoptLib.abstractGraph.MascoptObject
              |
              +--mascoptLib.abstractGraph.MascoptFixedSet
                    |
                    +--mascoptLib.abstractGraph.MascoptSet
                          |
                          +--mascoptLib.abstractGraph.AbstractEdgeSet
                                |
                                +--mascoptLib.graphs.EdgeSet
All Implemented Interfaces:
Cloneable, Collection, MascoptObjectInterface, Observer, Set

public class EdgeSet
extends AbstractEdgeSet

The EdgeSet and ArcSet class are derivated from MascoptSet. It allow to group Edge objects, respectively Arc objects, in a set.

Author:
Jean-Francois Lalande (Jean-Francois.Lalande@sophia.inria.fr)

Field Summary
 
Fields inherited from class mascoptLib.abstractGraph.MascoptFixedSet
initialCapacity, loadFactor
 
Constructor Summary
EdgeSet(mascoptLib.graphs.EdgeSet edgeSet)
          Creates a subset of a set of edges.
EdgeSet(mascoptLib.graphs.EdgeSet originalSet, boolean copyElements)
          Constructor for copy sets.
EdgeSet(mascoptLib.graphs.EdgeSet edgeSet, mascoptLib.graphs.VertexSet nodeSet)
          Create a subset of a set of edges based on another node set.
EdgeSet(mascoptLib.graphs.VertexSet nodeSet)
          This constructor creates an set of edges based on a set of nodes.
 
Method Summary
 boolean add(mascoptLib.graphs.Edge o)
          Adds an edge in the edge set
 mascoptLib.abstractGraph.AbstractEdgeSetFactory getFactory()
          Returns the library objects factory.
 mascoptLib.graphs.VertexSet getVertexSet()
          Returns the node set on wich is based the edge set
 boolean remove(mascoptLib.graphs.Edge o)
          Removes an edge from edgeset
 
Methods inherited from class mascoptLib.abstractGraph.AbstractEdgeSet
add, addAll, countAllAbstractEdgeSets, free, getAbstractVertexSet, remove, update
 
Methods inherited from class mascoptLib.abstractGraph.MascoptSet
add, add, addAll, clear, remove, remove, removeAll, removeAllValues, removeAllValuesOnElementsOfset, retainAll, setValueForAllElements, setValueForAllElements
 
Methods inherited from class mascoptLib.abstractGraph.MascoptFixedSet
contains, containsAll, countAllSets, equals, getSuperSet, hashCode, isEmpty, isSubSet, iterator, setSuperSet, size, toArray, toArray, toArray, toString
 
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, setDoubleValue, setDoubleValue, setDouValue, setDouValue, setIntegerValue, setIntegerValue, setIntValue, setIntValue, setName, setValue, setValue, setValue, setValue, setValue, setValue
 
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
getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Set
contains, containsAll, equals, hashCode, isEmpty, iterator, size, toArray, toArray
 

Constructor Detail

EdgeSet

public EdgeSet(mascoptLib.graphs.VertexSet nodeSet)
This constructor creates an set of edges based on a set of nodes. Only edges that can be related to this node can be added.

Parameters:
nodeSet - the set of nodes base of edges.

EdgeSet

public EdgeSet(mascoptLib.graphs.EdgeSet edgeSet)
Creates a subset of a set of edges. The subset is empty when created. You can easily add edges to the subset using the methods add and addAll.

Parameters:
edgeSet - the set of edges

EdgeSet

public EdgeSet(mascoptLib.graphs.EdgeSet originalSet,
               boolean copyElements)
Constructor for copy sets. Creates a new EdgeSet similar to originalSet. If copyElements is set to true then all the elements of originalSet are duplicated (and of course their id is changed) and the structure of the set is preserved (there exists an isomorphism between originalSet and the new set). In that case, the simple values are also copied, but those depending on a context are dropped. If copyElements is set to false, then the new set's elements point to those of originalSet.

Parameters:
originalSet - - the set to be copied.
copyElements - - indicates if the elements of the set have to be duplicated

EdgeSet

public EdgeSet(mascoptLib.graphs.EdgeSet edgeSet,
               mascoptLib.graphs.VertexSet nodeSet)
Create a subset of a set of edges based on another node set. Userfull to create subgraphs. We define subgraph with a se of edges include in the parent set of edges and a set of nodes included in the parent set of edges. The added constraint is that the subset of edges must be coherent with the subset of nodes. Then we call that a subgraph.

Parameters:
edgeSet - the parent set of edges
nodeSet - the parent set of nodes
Method Detail

getFactory

public mascoptLib.abstractGraph.AbstractEdgeSetFactory getFactory()
Returns the library objects factory.

Specified by:
getFactory in class AbstractEdgeSet

add

public boolean add(mascoptLib.graphs.Edge o)
Adds an edge in the edge set

Parameters:
o - the edge to add

remove

public boolean remove(mascoptLib.graphs.Edge o)
Removes an edge from edgeset

Parameters:
o - the edge to remove

getVertexSet

public mascoptLib.graphs.VertexSet getVertexSet()
Returns the node set on wich is based the edge set

Returns:
the NodeSet attached to this EdgeSet.