src/main/java/de/dfki/lt/loot/jada/Partition.java
public int findRepresentative (int a) {
    while (tree[a] != tree[tree[a]])
      a = tree[a] = tree[tree[a]];
    return tree[a];
  }
/** Find the representative of an equivalence class, doing path compression */
Find the representative of an equivalence class, doing path compression
Find the representative of an equivalence class doing path compression
public int findRepresentative (int a) {
    while (tree[a] != tree[tree[a]])
      a = tree[a] = tree[tree[a]];
    return tree[a];
  }
public int findRepresentative ( int a ) { while ( tree [ a ] != tree [ tree [ a ] ] ) a = tree [ a ] = tree [ tree [ a ] ] ; return tree [ a ] ; }
Find the representative of an equivalence class, doing path compression
Find the representative of an equivalence class doing path compression