edu.stanford.math.plex4.graph
public interface AbstractWeightedUndirectedGraph extends AbstractUndirectedGraph
Modifier and Type | Method and Description |
---|---|
void |
addEdge(int i,
int j,
double weight)
This function adds an edge with specified weight.
|
double |
getWeight(int i,
int j)
This function returns the weight of the edge (i, j).
|
addEdge, containsEdge, getDegree, getDegreeSequence, getLowerNeighbors, getNeighbors, getNumEdges, getNumVertices, iterator, removeEdge
double getWeight(int i, int j)
i
- the index of the first vertex of the edgej
- the index of the second vertex of the edgevoid addEdge(int i, int j, double weight)
i
- the index of the first vertex of the edgej
- the index of the second vertex of the edgeweight
- the weight of the edge