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

## dataStructures
Class AdjacencyWGraph

    java.lang.Object
      |
      +--dataStructures.Graph
            |
            +--dataStructures.AdjacencyWDigraph
                  |
                  +--dataStructures.AdjacencyWGraph

public class AdjacencyWGraph
extends AdjacencyWDigraph

Constructor Summary
`AdjacencyWGraph()`
`AdjacencyWGraph(int theVertices)`

Method Summary
`int` | `degree(int i)`
`int` | `inDegree(int i)`
`static void` | `main(java.lang.String[] args)` test program
`int` | `outDegree(int i)`
`void` | `putEdge(java.lang.Object theEdge)` put edge e into the graph, if the edge is already there, update its weight to e.weight
`void` | `removeEdge(int i, int j)` remove the edge (i,j)

Methods inherited from class dataStructures.AdjacencyWDigraph
`allPairs, btSalesperson, edges, existsEdge, iterator, leastCostBBSalesperson, output, shortestPaths, vertices`

Methods inherited from class dataStructures.Graph
`bellmanFord, bfs, bipartiteCover, connected, dfs, findPath, kruskal, labelComponents, topologicalOrder, verifyDirected, verifyUndirected, verifyWeighted, verifyWeightedUndirected`

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

Constructor Detail

### AdjacencyWGraph

    public AdjacencyWGraph(int theVertices)

### AdjacencyWGraph

    public AdjacencyWGraph()

Method Detail

### putEdge

    public void putEdge(java.lang.Object theEdge)

  put edge e into the graph, if the edge is already there, update its weight to e.weight
  Throws:
    java.lang.IllegalArgumentException - when theEdge cannot be an edge of the graph
  Overrides:
    putEdge in class AdjacencyWDigraph

### removeEdge

    public void removeEdge(int i,
                           int j)

  remove the edge (i,j)
  Overrides:
    removeEdge in class AdjacencyWDigraph

### degree

    public int degree(int i)

  Returns:
    degree of vertex i
  Throws:
    java.lang.IllegalArgumentException - when i is an invalid vertex
  Overrides:
    degree in class AdjacencyWDigraph

### outDegree

    public int outDegree(int i)

  Returns:
    degree of vertex i
  Overrides:
    outDegree in class AdjacencyWDigraph

### inDegree

    public int inDegree(int i)

  Returns:
    degree of vertex i
  Overrides:
    inDegree in class AdjacencyWDigraph

### main

    public static void main(java.lang.String[] args)

  test program

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