All pastes #405851 Raw Edit

Unnamed

public java v1 · immutable
·published 2007-03-21 23:53 UTC
rendered paste body
    public void addEdge(int v, int w) throws IllegalArgumentException {        if (v < 0 || v >= numVertices || w < 0 || w >= numVertices)            throw new IllegalArgumentException(                "Out of range: v = " + v + ", w = " + w + ".");	adjacentVertices[v] = w;	Edge e = new Edge(v,w);	edgeCosts[e] = NO_COST;    }