public class HashMapEdges
extends java.lang.Object
Remarks:
1) given an edge (u, v), the hash code is 'u*v' 2) the table stores triples (u, v, eIndex), where (u, v) is the key, and 'eIndex' is the value associated to that key
Constructor and Description |
---|
HashMapEdges(int n) |
Modifier and Type | Method and Description |
---|---|
int |
get(int u,
int v)
The 'key' is assumed to be the unordered pair (u, v)
|
static void |
main(java.lang.String[] args) |
void |
print() |
int |
put(int u,
int v,
int eIndex)
Insert the triple (u, v, eIndex) in the table, if not already existing.
|
public int get(int u, int v)
public int put(int u, int v, int eIndex)
public static void main(java.lang.String[] args)
public void print()