Class IntegerUnionFind

java.lang.Object
com.ibm.wala.util.intset.IntegerUnionFind

public class IntegerUnionFind extends Object
An implementation of Tarjan's union-find, using path compression and balancing, for non-negative integers
  • Constructor Details

    • IntegerUnionFind

      public IntegerUnionFind()
    • IntegerUnionFind

      public IntegerUnionFind(int size)
      Parameters:
      size - initial size of the tables
  • Method Details

    • union

      public void union(int x, int y)
      union the equiv classes of x and y
    • find

      public int find(int x)
      Returns:
      representative of x's equivalence class
    • size

      public int size()