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
Interface Graph

All Superinterfaces:
  ArchetypeGraph, Cloneable, UserDataContainer

All Known Subinterfaces:
  DirectedGraph, KPartiteGraph, UndirectedGraph

All Known Implementing Classes:
  AbstractSparseGraph, DirectedSparseGraph, KPartiteSparseGraph, SparseTree, UndirectedSparseGraph

public interface Graph
extends ArchetypeGraph

A specific type of `ArchetypeGraph` which consists of a `Vertex` set and an `Edge` set. Instances of `Graph` may contain either directed or undirected edges, but not both.

Author:
  Joshua O'Madadhain, Danyel Fisher, Scott White
See Also:
  `Edge`, `Vertex`

Nested Class Summary

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

Field Summary
`static Predicate` | `DIRECTED_EDGE`
`static Predicate` | `NOT_PARALLEL_EDGE`
`static Predicate` | `SIMPLE_EDGE`
`static Predicate` | `UNDIRECTED_EDGE`

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

Method Summary
`Edge` | `addEdge(Edge e)` Adds `e` to this graph, and returns a reference to the added vertex.
`Vertex` | `addVertex(Vertex v)` Adds `v` to this graph, and returns a reference to the added vertex.
`boolean` | `isDirected()` Deprecated. As of version 1.4, replaced by `edu.uci.ics.jung.graph.utils.PredicateUtils#enforcesDirected(Graph)` and `edu.uci.ics.jung.graph.utils.PredicateUtils#enforcesUndirected(Graph)`.
`void` | `removeEdge(Edge e)` Removes `e` from this graph.
`void` | `removeVertex(Vertex v)` Removes `v` from this graph.

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

### DIRECTED_EDGE

    public static final Predicate DIRECTED_EDGE

### UNDIRECTED_EDGE

    public static final Predicate UNDIRECTED_EDGE

### NOT_PARALLEL_EDGE

    public static final Predicate NOT_PARALLEL_EDGE

### SIMPLE_EDGE

    public static final Predicate SIMPLE_EDGE

Method Detail

### isDirected

    public boolean isDirected()

  Deprecated. As of version 1.4, replaced by `edu.uci.ics.jung.graph.utils.PredicateUtils#enforcesDirected(Graph)` and `edu.uci.ics.jung.graph.utils.PredicateUtils#enforcesUndirected(Graph)`.

  Returns `true` if each edge of this graph is directed, and `false` if each edge of this graph is undirected. If some edges are directed and some are not, throws `FatalException`.

### addVertex

    public Vertex addVertex(Vertex v)

  Adds `v` to this graph, and returns a reference to the added vertex.

  Parameters:
    `v` - the vertex to be added

### addEdge

    public Edge addEdge(Edge e)

  Adds `e` to this graph, and returns a reference to the added vertex.

  Parameters:
    `e` - the edge to be added

### removeVertex

    public void removeVertex(Vertex v)

  Removes `v` from this graph. Any edges incident to `v` which become ill-formed (as defined in the documentation for `ArchetypeEdge`) as a result of removing `v` are also removed from this graph. Throws `IllegalArgumentException` if `v` is not in this graph.

### removeEdge

    public void removeEdge(Edge e)

  Removes `e` from this graph. Throws `IllegalArgumentException` if `e` is not in this graph.

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