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.filters
Class UnassembledGraph

    java.lang.Object
      edu.uci.ics.jung.graph.filters.UnassembledGraph

public class UnassembledGraph
extends Object

This class represents an unassembled graph. It does not implement Graph. It represents the collection of vertices and edges that were generated by the filter. VERTICES that are members of this DO NOT fulfill the vertex contract, as they claim their graph is the source graph.

The filter process looks like this:

      		SOURCE GRAPH - [ Filter1 ] - UnassembledGraph - [Filter2] - UnassembledGraph  - [Assemble] - Graph

Author:
  danyelf

Field Summary
`protected Set` | `edgeSet`
`protected Filter` | `filter` Holds a reference to the filter that generated this UnassembledGraph
`protected String` | `name`
`protected Graph` | `originalGraph`
`protected UnassembledGraph` | `previousGraph`
`protected Set` | `vertexSet` Holds a reference to the filter that generated this UnassembledGraph

Constructor Summary
`UnassembledGraph(Filter f, Set vertices, Set edges, Graph original)`
`UnassembledGraph(Filter f, Set vertices, Set edges, UnassembledGraph previous)`
`UnassembledGraph(String name, Set vertices, Set edges, Graph original)` A constructor that uses non-Filters (for example, GraphCluterers) to build themselves.

Method Summary
`Graph` | `assemble()`
`Graph` | `assemble(boolean shouldPreserveRecord)` Constructs a new graph based on the source graph.
`String` | `getFilterName()` Returns the name of the filter that generated this UnassembledGraph.
`Graph` | `getOriginalGraph()` Returns the original graph that was subsetted for this UnsassembledGraph.
`Set` | `getUntouchedEdges()` Returns the set of edges (from `getOriginalGraph()`) that passed the filter.
`Set` | `getUntouchedVertices()` Returns the set of vertices (from `getOriginalGraph()`) that passed the filter.
`String` | `toString()`

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

Field Detail

### name

    protected String name

### filter

    protected Filter filter

  Holds a reference to the filter that generated this UnassembledGraph

### vertexSet

    protected Set vertexSet

  Holds a reference to the filter that generated this UnassembledGraph

### edgeSet

    protected Set edgeSet

### previousGraph

    protected UnassembledGraph previousGraph

### originalGraph

    protected Graph originalGraph

Constructor Detail

### UnassembledGraph

    public UnassembledGraph(Filter f,
                            Set vertices,
                            Set edges,
                            Graph original)

### UnassembledGraph

    public UnassembledGraph(String name,
                            Set vertices,
                            Set edges,
                            Graph original)

  A constructor that uses non-Filters (for example, GraphCluterers) to build themselves.

Parameters:
  `name` - A name to refer to the caller (e.g. "EdgeBetweenessCluster(3)")
  `vertices` - The set of vertices in this UnassembledGraph
  `edges` - The set of edges in this UnassembledGraph
  `original` - The graph from which this data comes

### UnassembledGraph

    public UnassembledGraph(Filter f,
                            Set vertices,
                            Set edges,
                            UnassembledGraph previous)

Method Detail

### getFilterName

    public String getFilterName()

  Returns the name of the filter that generated this UnassembledGraph.

### getOriginalGraph

    public Graph getOriginalGraph()

  Returns the original graph that was subsetted for this UnsassembledGraph.

### getUntouchedVertices

    public Set getUntouchedVertices()

  Returns the set of vertices (from `getOriginalGraph()`) that passed the filter.

### getUntouchedEdges

    public Set getUntouchedEdges()

  Returns the set of edges (from `getOriginalGraph()`) that passed the filter.

### toString

    public String toString()

### assemble

    public Graph assemble(boolean shouldPreserveRecord)

  Constructs a new graph based on the source graph. Assumes that edges should only be copied if they contain all the original edge's vertices; all vertices that pass the filter are copied.

  Here's the general theory:

  - A Graph object of the appropriate type can be obtained by calling ``Graph.newInstance()`` on the original.
  - Then, the graph is populated with all vertices that the filters have passed (that is, the vertices in ``getUntouchedVertices()``. Vertices are copied in with ``copy(Graph)``.
  - Last, the graph is populated with all edges that have both passed, and have both ends in vertices that passed.

### assemble

    public Graph assemble()

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