code: public void computeNonEdgeForces(int pointIndex, double theta, INDArray negativeForce, AtomicDouble sumQ) {
          // Make sure that we spend no time on empty nodes or self-interactions
          if (cumSize == 0 || (isLeaf() && size == 1 && index[0] == pointIndex))
              return;
          MemoryWorkspace workspace =
                  workspaceMode == WorkspaceMode.NONE ? new DummyWorkspace()
                          : Nd4j.getWorkspaceManager().getWorkspaceForCurrentThread(
                          workspaceConfigurationExternal,
                          workspaceExternal);
          try (MemoryWorkspace ws = workspace.notifyScopeEntered()) {
  
  
              // Compute distance between point and center-of-mass
              buf.assign(data.slice(pointIndex)).subi(centerOfMass);
  
              double D = Nd4j.getBlasWrapper().dot(buf, buf);
              // Check whether we can use this node as a "summary"
              double maxWidth = boundary.width().max(Integer.MAX_VALUE).getDouble(0);
              // Check whether we can use this node as a "summary"
              if (isLeaf() || maxWidth / Math.sqrt(D) < theta) {
  
                  // Compute and add t-SNE force between point and current node
                  double Q = 1.0 / (1.0 + D);
                  double mult = cumSize * Q;
                  sumQ.addAndGet(mult);
                  mult *= Q;
                  negativeForce.addi(buf.muli(mult));
  
              } else {
  
                  // Recursively apply Barnes-Hut to children
                  for (int i = 0; i < numChildren; i++) {
                      children[i].computeNonEdgeForces(pointIndex, theta, negativeForce, sumQ);
                  }
  
              }
          }
      }
docs: Compute non edge forces using barnes hut
  @param pointIndex
  @param theta
  @param negativeForce
  @param sumQ