Class AbstractRegionBSPTree.Condenser<P extends Point<P>,​N extends AbstractRegionBSPTree.AbstractRegionNode<P,​N>>

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private boolean modifiedTree
      Flag set to true if the tree was modified during the operation.
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private Condenser()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      (package private) boolean condense​(N node)
      Condense the nodes in the subtree rooted at the given node.
      private RegionLocation condenseRecursive​(N node)
      Recursively condense nodes that have children with homogenous location attributes (eg, both inside, both outside) into single nodes.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • modifiedTree

        private boolean modifiedTree
        Flag set to true if the tree was modified during the operation.
    • Constructor Detail

      • Condenser

        private Condenser()
    • Method Detail

      • condense

        boolean condense​(N node)
        Condense the nodes in the subtree rooted at the given node. Redundant child nodes are removed. The tree is invalidated if the tree structure was modified.
        Parameters:
        node - the root node of the subtree to condense
        Returns:
        true if the tree was modified.
      • condenseRecursive

        private RegionLocation condenseRecursive​(N node)
        Recursively condense nodes that have children with homogenous location attributes (eg, both inside, both outside) into single nodes.
        Parameters:
        node - the root of the subtree to condense
        Returns:
        the location of the successfully condensed subtree or null if no condensing was able to be performed