int function ( Object arg0 , Object arg1 ) { int loc0 = 0 ; Edge loc1 = EdgeFromTable ( new VertexPair ( arg0 , arg1 ) ) ; if ( loc1 != null ) { loc0 = loc1 . weight ( ) ; } return loc0 ; }
weight returns the weight of u , v . returns zero if u , v is not an edge including the case where either of the parameters u and v does not represent a vertex of the graph . note : a well-behaved application should try to avoid calling this method for an edge that is not in the graph , and should certainly not treat the result as if it actually represents an edge with weight zero . however , some sort of default response is necessary for missing edges , so we return zero . an exception would be more appropriate , but also more annoying . running time : o 1 . concode_field_sep DList vertList concode_elem_sep HashTableChained vertices concode_elem_sep HashTableChained edgesTable concode_elem_sep int numEdge concode_elem_sep int numVert concode_field_sep boolean isVertex concode_elem_sep void removeVertex concode_elem_sep boolean isEdge concode_elem_sep Vertex VertFromTable concode_elem_sep int edgeCount concode_elem_sep int degree concode_elem_sep int vertexCount concode_elem_sep Neighbors getNeighbors concode_elem_sep void removeEdge concode_elem_sep Edge EdgeFromTable concode_elem_sep Object[] getVertices concode_elem_sep void addVertex concode_elem_sep void addEdge