org.jcae.mesh.amibe.util
Class PAVLSortedTree<E>

java.lang.Object
  extended by org.jcae.mesh.amibe.util.QSortedTree<E>
      extended by org.jcae.mesh.amibe.util.PAVLSortedTree<E>
All Implemented Interfaces:
java.io.Serializable

public class PAVLSortedTree<E>
extends QSortedTree<E>

PAVL binary trees to store quality factors. Main ideas come from Ben Pfaff's GNU libavl. These trees are used to sort vertices, edges, or triangles according to their quality factors, and to process them in increasing or decreasing order after they have been sorted. See examples in algorithms from org.jcae.mesh.amibe.algos3d.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.jcae.mesh.amibe.util.QSortedTree
root
 
Constructor Summary
PAVLSortedTree()
           
 
Method Summary
 boolean insertNode(QSortedTree.Node<E> o)
          Insert a new note into the binary tree.
 org.jcae.mesh.amibe.util.PAVLSortedTree.Node<E> newNode(E o, double v)
          Constructor to cast new nodes into subclass type.
 org.jcae.mesh.amibe.util.PAVLSortedTree.Node<E> removeNode(QSortedTree.Node<E> o)
          Remove a note from the binary tree.
 
Methods inherited from class org.jcae.mesh.amibe.util.QSortedTree
backwardIterator, clear, contains, getRootValue, insert, isEmpty, iterator, readObject, remove, show, showValues, size, update
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PAVLSortedTree

public PAVLSortedTree()
Method Detail

newNode

public final org.jcae.mesh.amibe.util.PAVLSortedTree.Node<E> newNode(E o,
                                                                     double v)
Description copied from class: QSortedTree
Constructor to cast new nodes into subclass type.

Specified by:
newNode in class QSortedTree<E>

insertNode

public final boolean insertNode(QSortedTree.Node<E> o)
Description copied from class: QSortedTree
Insert a new note into the binary tree. This method always returns true.

Specified by:
insertNode in class QSortedTree<E>

removeNode

public final org.jcae.mesh.amibe.util.PAVLSortedTree.Node<E> removeNode(QSortedTree.Node<E> o)
Description copied from class: QSortedTree
Remove a note from the binary tree. Some algorithms may remove another node (for instance PRedBlackSortedTree), this method returns the node which has been removed.

Specified by:
removeNode in class QSortedTree<E>