Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## edu.uci.ics.jung.graph.impl
Class KPartiteSparseGraph

    java.lang.Object
      edu.uci.ics.jung.utils.UserDataDelegate
          edu.uci.ics.jung.graph.impl.AbstractArchetypeGraph
              edu.uci.ics.jung.graph.impl.AbstractSparseGraph
                  edu.uci.ics.jung.graph.impl.SparseGraph
                      edu.uci.ics.jung.graph.impl.KPartiteSparseGraph

All Implemented Interfaces:
  ArchetypeGraph, Cloneable, Graph, KPartiteGraph, UserDataContainer

public class KPartiteSparseGraph
extends SparseGraph
implements KPartiteGraph

An implementation of KPartiteGraph based on SparseGraph. This implementation optionally creates a subset for each partition specified in the constructor.

Vertex constraints imposed by this class: predicates in `partitions` constructor argument

Edge constraints imposed by this class: `KPartiteEdgePredicate(partitions)`

Author:
  Joshua O'Madadhain

Nested Class Summary

Nested classes inherited from class edu.uci.ics.jung.graph.impl.AbstractArchetypeGraph
`AbstractArchetypeGraph.Requirements`

Nested classes inherited from class edu.uci.ics.jung.utils.UserDataContainer
`UserDataContainer.CopyAction`

Field Summary
`protected Collection` | `partitions`

Fields inherited from class edu.uci.ics.jung.graph.impl.AbstractSparseGraph
`mEdges, mVertices`

Fields inherited from class edu.uci.ics.jung.graph.impl.AbstractArchetypeGraph
`edge_requirements, mEdgeIDs, mGraphListenerHandler, mVertexIDs, vertex_requirements`

Fields inherited from class edu.uci.ics.jung.utils.UserDataDelegate
`factory, udc_delegate`

Fields inherited from interface edu.uci.ics.jung.graph.Graph
`DIRECTED_EDGE, NOT_PARALLEL_EDGE, SIMPLE_EDGE, UNDIRECTED_EDGE`

Fields inherited from interface edu.uci.ics.jung.graph.ArchetypeGraph
`SUBSET_MANAGER`

Constructor Summary
`KPartiteSparseGraph(Collection partitions, boolean subsets)` Creates a KPartiteSparseGraph whose partitions are specified by the predicates in the `partitions` array.
`KPartiteSparseGraph(Graph g, Collection partitions, boolean subsets)` Creates a new `KPartiteSparseGraph` which contains all the vertices and edges in `g`.

Method Summary
`Collection` | `getPartitions()` Returns the array of predicates which define the partitions of this graph.

Methods inherited from class edu.uci.ics.jung.graph.impl.AbstractSparseGraph
`addEdge, addVertex, getEdges, getVertices, initialize, isDirected, removeEdge, removeEdges, removeVertex, removeVertices`

Methods inherited from class edu.uci.ics.jung.graph.impl.AbstractArchetypeGraph
`addAllNotInitializers, addListener, checkConstraints, copy, getEdgeConstraints, getVertexConstraints, listenersExist, newInstance, numEdges, numVertices, removeAllEdges, removeAllVertices, removeListener, toString`

Methods inherited from class edu.uci.ics.jung.utils.UserDataDelegate
`addUserDatum, clone, containsUserDatumKey, getUserDatum, getUserDatumCopyAction, getUserDatumKeyIterator, importUserData, removeUserDatum, setUserDataFactory, setUserDatum`

Methods inherited from class java.lang.Object
`equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Methods inherited from interface edu.uci.ics.jung.graph.Graph
`addEdge, addVertex, isDirected, removeEdge, removeVertex`

Methods inherited from interface edu.uci.ics.jung.graph.ArchetypeGraph
`addListener, copy, getEdgeConstraints, getEdges, getVertexConstraints, getVertices, newInstance, numEdges, numVertices, removeAllEdges, removeAllVertices, removeEdges, removeListener, removeVertices`

Methods inherited from interface edu.uci.ics.jung.utils.UserDataContainer
`addUserDatum, clone, containsUserDatumKey, getUserDatum, getUserDatumCopyAction, getUserDatumKeyIterator, importUserData, removeUserDatum, setUserDatum`

Field Detail

### partitions

    protected Collection partitions

Constructor Detail

### KPartiteSparseGraph

    public KPartiteSparseGraph(Collection partitions,
                               boolean subsets)

  Creates a KPartiteSparseGraph whose partitions are specified by the predicates in the `partitions` array. If the `subsets` argument is true, creates a subset for each partition.

### KPartiteSparseGraph

    public KPartiteSparseGraph(Graph g,
                               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.

Method Detail

### getPartitions

    public Collection getPartitions()

  Description copied from interface: `KPartiteGraph`
  Returns the array of predicates which define the partitions of this graph.

  Specified by:
    `getPartitions` in interface `KPartiteGraph`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD