docs: public boolean isCorrect() {
          MemoryWorkspace workspace =
                  workspaceMode == WorkspaceMode.NONE ? new DummyWorkspace()
                          : Nd4j.getWorkspaceManager().getWorkspaceForCurrentThread(
                          workspaceConfigurationExternal,
                          workspaceExternal);
          try (MemoryWorkspace ws = workspace.notifyScopeEntered()) {
  
              for (int n = 0; n < size; n++) {
                  INDArray point = data.slice(index[n]);
                  if (!boundary.contains(point))
                      return false;
              }
              if (!isLeaf()) {
                  boolean correct = true;
                  for (int i = 0; i < numChildren; i++)
                      correct = correct && children[i].isCorrect();
                  return correct;
              }
  
              return true;
          }
      }
  
      /**
       * The depth of the node
       * @return the depth of the node
       */
      public int depth() {
          if (isLeaf())
              return 1;
          int depth = 1;
          int maxChildDepth = 0;
          for (int i = 0; i < numChildren; i++) {
              maxChildDepth = Math.max(maxChildDepth, children[0].depth());
          }
  
          return depth + maxChildDepth;
      }
  
      private void fill(int n) {
          if (indices.isEmpty() && parent == null)
              for (int i = 0; i < n; i++) {
                  log.trace("Inserted " + i);
                  insert(i);
              }
          else
              log.warn("Called fill already");
      }
  
  
      public SpTree[] getChildren() {
          return children;
      }
  
      public int getD() {
          return D;
      }
  
      public INDArray getCenterOfMass() {
          return centerOfMass;
      }
  
      public Cell getBoundary() {
          return boundary;
      }
  
      public int[] getIndex() {
          return index;
      }
  
      public int getCumSize() {
          return cumSize;
      }
  
      public void setCumSize(int cumSize) {
          this.cumSize = cumSize;
      }
  
      public int getNumChildren() {
          return numChildren;
      }
  
      public void setNumChildren(int numChildren) {
          this.numChildren = numChildren;
      }
  
  }