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.RequirementsUserDataContainer.CopyAction| Modifier and Type | Field and Description |
|---|---|
protected java.util.Collection |
partitions |
mEdges, mVerticesedge_requirements, mEdgeIDs, mGraphListenerHandler, mVertexIDs, vertex_requirementsfactory, udc_delegateDIRECTED_EDGE, NOT_PARALLEL_EDGE, SIMPLE_EDGE, UNDIRECTED_EDGESUBSET_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, removeVerticesaddAllNotInitializers, addListener, checkConstraints, copy, getEdgeConstraints, getVertexConstraints, listenersExist, newInstance, numEdges, numVertices, removeAllEdges, removeAllVertices, removeListener, toStringaddUserDatum, clone, containsUserDatumKey, getUserDatum, getUserDatumCopyAction, getUserDatumKeyIterator, importUserData, removeUserDatum, setUserDataFactory, setUserDatumequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitaddEdge, addVertex, isDirected, removeEdge, removeVertexaddListener, copy, getEdgeConstraints, getEdges, getVertexConstraints, getVertices, newInstance, numEdges, numVertices, removeAllEdges, removeAllVertices, removeEdges, removeListener, removeVerticesaddUserDatum, clone, containsUserDatumKey, getUserDatum, getUserDatumCopyAction, getUserDatumKeyIterator, importUserData, removeUserDatum, setUserDatumpublic 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()
KPartiteGraphgetPartitions in interface KPartiteGraph