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 AdjacencyGraph

    java.lang.Object
      |
      +--dataStructures.Graph
            |
            +--dataStructures.AdjacencyDigraph
                  |
                  +--dataStructures.AdjacencyGraph

public class AdjacencyGraph
extends AdjacencyDigraph

Constructor Summary
`AdjacencyGraph()`
`AdjacencyGraph(int theVertices)`

Method Summary
`int` | `btMaxClique(int[] maxClique)` solve max-clique problem using backtracking
`int` | `degree(int i)`
`int` | `inDegree(int i)`
`static void` | `main(java.lang.String[] args)` test program for basic graph methods
`int` | `maxProfitBBMaxClique(int[] maxClique)` max-profit branch-and-bound code to find a max clique
`int` | `outDegree(int i)`
`void` | `putEdge(java.lang.Object theEdge)` put edge e into the graph
`void` | `removeEdge(int i, int j)` remove the edge (i,j)

Methods inherited from class dataStructures.AdjacencyDigraph
`bfs, edges, existsEdge, iterator, output, vertices`

Methods inherited from class dataStructures.Graph
`bellmanFord, 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

### AdjacencyGraph

    public AdjacencyGraph(int theVertices)

### AdjacencyGraph

    public AdjacencyGraph()

Method Detail

### putEdge

    public void putEdge(java.lang.Object theEdge)

  put edge e into the graph
  Throws:
    java.lang.IllegalArgumentException - when theEdge is invalid
  Overrides:
    putEdge in class AdjacencyDigraph

### removeEdge

    public void removeEdge(int i,
                           int j)

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

### 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 AdjacencyDigraph

### outDegree

    public int outDegree(int i)

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

### inDegree

    public int inDegree(int i)

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

### btMaxClique

    public int btMaxClique(int[] maxClique)

  solve max-clique problem using backtracking
  Parameters:
    `maxClique` - set maxClique[i] = 1 iff i is in max clique
  Returns:
    size of max clique

### maxProfitBBMaxClique

    public int maxProfitBBMaxClique(int[] maxClique)

  max-profit branch-and-bound code to find a max clique
  Parameters:
    `maxClique` - maxClique[i] set to 1 iff i is in max clique
  Returns:
    size of max clique

### main

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

  test program for basic graph methods

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