Interface UnionFind

    • Method Detail

      • union

        int union​(DBIDRef p,
                  DBIDRef q)
        Join the components of elements p and q.
        Parameters:
        p - First element
        q - Second element
        Returns:
        Component id.
      • isConnected

        boolean isConnected​(DBIDRef p,
                            DBIDRef q)
        Test if two components are connected.
        Parameters:
        p - First element
        q - Second element
        Returns:
        true if they are in the same component.
      • getRoots

        DBIDs getRoots()
        Collect all component root elements.
        Returns:
        Root elements
      • find

        int find​(DBIDRef p)
        Find the component ID of an element.
        Parameters:
        p - Element
        Returns:
        Component id