Interface ILcdPartitionedGraph<N,E>
- All Superinterfaces:
ILcdGraph<N,E>
- All Known Subinterfaces:
ILcdLimitedEditablePartitionedGraph<N,E>
- All Known Implementing Classes:
TLcdLimitedEditablePartitionedGraph,TLcdPartitionedGraph
An
ILcdPartitionedGraph is an ILcdGraph which is composed of partitions.
Since it is an ILcdGraph, it should respect all invariants as
stated in the ILcdGraph documentation, especially those concerning the uniqueness of a node or edge
in a graph.
The following terms are used in the context of partitioned graphs:
- a partition of a partitioned graph is a graph that is directly part of that graph. A partition A that is contained in a partitioned graph B that is itself a partition contained in another partitioned graph C, is thus not considered as a partition of C.
- the internal edges (or just 'edges') of a graph - partitioned or not - are all the edges that have their start and end node both contained in that graph.
- the boundary edges of a partition are all edges that have one of their nodes contained in that partition, and the other one in another partition of the partitioned graph in which the partition is contained.
- the boundary nodes of a partition are all nodes that are part of that partition and are connected to at least one boundary edge of that partition.
- the boundary graph of a partitioned graph is the graph that contains all boundary edges and boundary nodes of all its partitions.
- a
TLcdGraphChangedEvent, fired by one of its child partitions, should be propagated further (i.e., a newTLcdGraphChangedEventshould be generated, with the same parameters, except for the source), since each modification to a child partition is also an identical modification to the partitioned graph as a whole. - if one of the child partitions is a partitioned graph itself,
a
TLcdPartitionedGraphChangedEvent, fired by this child, should not be propagated further, as the child's internal structure (whether it is a partitioned graph or not) is made abstraction of by this graph.
- Since:
- 5.1
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddPartitionedGraphListener(ILcdPartitionedGraphListener<N, E> aPartitionedGraphListener) Registers the givenILcdPartitionedGraphListenerwith this graph.booleancontainsPartition(ILcdGraph<N, E> aPartition) Returns true if the given graph is a partition of this graph, false otherwise.getBoundaryEdges(ILcdGraph<N, E> aPartition) Returns an enumeration containing all boundary edges of the given partition.Returns the boundary graph of this graph.getBoundaryNodes(ILcdGraph<N, E> aPartition) Returns an enumeration containing all boundary nodes of the given partition.getPartitionForEdge(E aEdge) Returns the partition of this partitioned graph that contains the given edge, ornullif the given edge is not part of a partition in this graph.getPartitionForNode(N aNode) Returns the partition of this partitioned graph that contains the given node, ornullif the given node is not part of a partition in this graph.Returns anEnumerationcontaining all partitions of this graph.voidremovePartitionedGraphListener(ILcdPartitionedGraphListener<N, E> aPartitionedGraphListener) Unregisters the givenILcdPartitionedGraphListenerfrom this graph.Methods inherited from interface com.luciad.network.graph.ILcdGraph
addGraphListener, containsEdge, containsNode, getEdges, getEdges, getEndNode, getNodes, getOppositeNode, getStartNode, isConnected, removeGraphListener
-
Method Details
-
getPartitions
Enumeration<ILcdGraph<N,E>> getPartitions()Returns anEnumerationcontaining all partitions of this graph.- Returns:
- an
Enumerationcontaining all the partitions of this graph.
-
containsPartition
Returns true if the given graph is a partition of this graph, false otherwise.- Parameters:
aPartition- the partition to be checked for.- Returns:
- true if the given graph is a partition of this graph, false otherwise.
- Throws:
NullPointerException- ifaPartitionisnull.
-
getPartitionForNode
Returns the partition of this partitioned graph that contains the given node, ornullif the given node is not part of a partition in this graph.- Parameters:
aNode- the node whose graph should be returned.- Returns:
- the partition of this graph that contains this node.
- Throws:
NullPointerException- if the given node isnull.
-
getPartitionForEdge
Returns the partition of this partitioned graph that contains the given edge, ornullif the given edge is not part of a partition in this graph. The partitions connected by a boundary edge should be retrieved by calling thegetPartitionForNodemethod with as argument one of the two nodes connected by this edge.- Parameters:
aEdge- the edge whose graph should be returned.- Returns:
- the partition of this graph that contains this edge.
- Throws:
IllegalArgumentException- if the given edge is not part of this graph or the given edge is a boundary edge.NullPointerException- if the given edge isnull.
-
getBoundaryGraph
Returns the boundary graph of this graph.- Returns:
- the boundary graph of this graph.
-
getBoundaryEdges
Returns an enumeration containing all boundary edges of the given partition.- Parameters:
aPartition- the partition to which the boundary edges should be connected.- Returns:
- an enumeration containing all boundary edges of the given partition.
- Throws:
NullPointerException- if the given graph isnull.IllegalArgumentException- if the given graph is not a partition of this partitioned graph.
-
getBoundaryNodes
Returns an enumeration containing all boundary nodes of the given partition.- Parameters:
aPartition- the partition from which the boundary should be part.- Returns:
- an enumeration containing all boundary nodes of the given partition.
- Throws:
NullPointerException- if the given graph isnull.IllegalArgumentException- if the given graph is not a partition of this partitioned graph.
-
addPartitionedGraphListener
Registers the givenILcdPartitionedGraphListenerwith this graph. All events generated by this graph afterwards will be sent to the given listener, until it is removed from this graph.- Parameters:
aPartitionedGraphListener- the graph listener to be registered with this graph.- Throws:
NullPointerException- if the given listener isnull.
-
removePartitionedGraphListener
Unregisters the givenILcdPartitionedGraphListenerfrom this graph. After it has been unregistered, no events generated by this graph will be sent to the given listener anymore.- Parameters:
aPartitionedGraphListener- the graph listener to be unregistered from this graph.- Throws:
NullPointerException- if the given listener isnull.IllegalArgumentException- if the given listener is not currently registered as a listener of this graph.
-