public boolean isCorrect ( ) { for ( int n = 0 ; n < size ; n ++ ) { INDArray point = data . slice ( index [ n ] ) ; if ( ! boundary . containsPoint ( point ) ) return false ; } return isLeaf ( ) || northWest . isCorrect ( ) && northEast . isCorrect ( ) && southWest . isCorrect ( ) && southEast . isCorrect ( ) ; }
Returns whether the tree is consistent or not