public class KPartiteSparseGraph extends SparseGraph implements KPartiteGraph
Vertex constraints imposed by this class: predicates in
partitions
constructor argument
Edge constraints imposed by this class:
KPartiteEdgePredicate(partitions)
AbstractArchetypeGraph.Requirements
UserDataContainer.CopyAction
Modifier and Type | Field and Description |
---|---|
protected java.util.Collection |
partitions |
mEdges, mVertices
edge_requirements, mEdgeIDs, mGraphListenerHandler, mVertexIDs, vertex_requirements
factory, udc_delegate
DIRECTED_EDGE, NOT_PARALLEL_EDGE, SIMPLE_EDGE, UNDIRECTED_EDGE
SUBSET_MANAGER
Constructor and Description |
---|
KPartiteSparseGraph(java.util.Collection partitions,
boolean subsets)
Creates a KPartiteSparseGraph whose partitions are specified by
the predicates in the
partitions array. |
KPartiteSparseGraph(Graph g,
java.util.Collection partitions,
boolean subsets)
Creates a new
KPartiteSparseGraph which contains all the
vertices and edges in g . |
Modifier and Type | Method and Description |
---|---|
java.util.Collection |
getPartitions()
Returns the array of predicates which define the partitions
of this graph.
|
addEdge, addVertex, getEdges, getVertices, initialize, isDirected, removeEdge, removeEdges, removeVertex, removeVertices
addAllNotInitializers, addListener, checkConstraints, copy, getEdgeConstraints, getVertexConstraints, listenersExist, newInstance, numEdges, numVertices, removeAllEdges, removeAllVertices, removeListener, toString
addUserDatum, clone, containsUserDatumKey, getUserDatum, getUserDatumCopyAction, getUserDatumKeyIterator, importUserData, removeUserDatum, setUserDataFactory, setUserDatum
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
addEdge, addVertex, isDirected, removeEdge, removeVertex
addListener, copy, getEdgeConstraints, getEdges, getVertexConstraints, getVertices, newInstance, numEdges, numVertices, removeAllEdges, removeAllVertices, removeEdges, removeListener, removeVertices
addUserDatum, clone, containsUserDatumKey, getUserDatum, getUserDatumCopyAction, getUserDatumKeyIterator, importUserData, removeUserDatum, setUserDatum
public KPartiteSparseGraph(java.util.Collection partitions, boolean subsets)
partitions
array. If the
subsets
argument is true, creates a subset for
each partition.public KPartiteSparseGraph(Graph g, java.util.Collection partitions, boolean subsets)
Creates a new KPartiteSparseGraph
which contains all the
vertices and edges in g
. The new graph contains all the
user data from the original graph and its components.
This method performs no tagging or structural conversion. If
g
is not compatible with the constraints specified by
partitions
, this constructor will throw an
IllegalArgumentException
. Thus, each vertex in
g
must be a member of exactly one partition, and each edge
must join vertices in distinct partitions.
public java.util.Collection getPartitions()
KPartiteGraph
getPartitions
in interface KPartiteGraph