com.hp.hpl.jena.ontology
Class OntTools.DisjointSet

java.lang.Object
  extended by com.hp.hpl.jena.ontology.OntTools.DisjointSet
Enclosing class:
OntTools

public static class OntTools.DisjointSet
extends Object

A simple representation of disjoint sets


Constructor Summary
OntTools.DisjointSet(Resource node)
           
 
Method Summary
 OntTools.DisjointSet find()
          The find operation collapses the pointer to the root parent, which is one of Tarjan's standard optimisations.
 OntTools.DisjointSet getAncestor()
           
 Resource getNode()
           
 OntTools.DisjointSet getParent()
           
 int getRank()
           
 void incrementRank()
           
 boolean isBlack()
           
 void setAncestor(OntTools.DisjointSet anc)
           
 void setBlack()
           
 void setParent(OntTools.DisjointSet parent)
           
 void setUsed()
           
 String toShortString()
           
 String toString()
           
 void union(OntTools.DisjointSet y)
          The union of two sets
 boolean used()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

OntTools.DisjointSet

public OntTools.DisjointSet(Resource node)
Method Detail

getNode

public Resource getNode()

getParent

public OntTools.DisjointSet getParent()

setParent

public void setParent(OntTools.DisjointSet parent)

getRank

public int getRank()

incrementRank

public void incrementRank()

getAncestor

public OntTools.DisjointSet getAncestor()

setAncestor

public void setAncestor(OntTools.DisjointSet anc)

setBlack

public void setBlack()

isBlack

public boolean isBlack()

used

public boolean used()

setUsed

public void setUsed()

find

public OntTools.DisjointSet find()
The find operation collapses the pointer to the root parent, which is one of Tarjan's standard optimisations.

Returns:
The representative of the union containing this set

union

public void union(OntTools.DisjointSet y)
The union of two sets

Parameters:
y -

toString

public String toString()
Overrides:
toString in class Object
Returns:
A string representation of this set for debugging
See Also:
Object.toString()

toShortString

public String toShortString()


Licenced under the Apache License, Version 2.0