docs: private void nodeAddition(final double[][] mat, final BiclusterCandidate cand) {
      cand.updateRowAndColumnMeans(mat, true);
      cand.computeMeanSquaredDeviation(mat);
      while(true) {
        // We need this to be final + mutable
        final boolean[] added = new boolean[] { false, false };
  
        // Step 2: add columns
        cand.visitRow(mat, 0, CellVisitor.NOT_SELECTED, new CellVisitor() {
          @Override
          public boolean visit(double val, int row, int col, boolean selrow, boolean selcol) {
            assert (!selcol);
            if(cand.computeColResidue(mat, col) <= cand.residue) {
              cand.selectColumn(col, true);
              added[0] = true;
            }
            return false;
          }
        });
  
        // Step 3: recompute values
        if(added[0]) {
          cand.updateRowAndColumnMeans(mat, true);
          cand.computeMeanSquaredDeviation(mat);
        }
  
        // Step 4: try adding rows.
        cand.visitColumn(mat, 0, CellVisitor.NOT_SELECTED, new CellVisitor() {
          @Override
          public boolean visit(double val, int row, int col, boolean selrow, boolean selcol) {
            assert (!selrow);
            if(cand.computeRowResidue(mat, row, false) <= cand.residue) {
              cand.selectRow(row, true);
              added[1] = true;
            }
            return false;
          }
        });
  
        // Step 5: try adding inverted rows.
        if(useinverted) {
          cand.visitColumn(mat, 0, CellVisitor.NOT_SELECTED, new CellVisitor() {
            @Override
            public boolean visit(double val, int row, int col, boolean selrow, boolean selcol) {
              assert (!selrow);
              if(cand.computeRowResidue(mat, row, true) <= cand.residue) {
                cand.selectRow(row, true);
                cand.invertRow(row, true);
                added[1] = true;
              }
              return false;
            }
          });
        }
        if(added[1]) {
          cand.updateRowAndColumnMeans(mat, true);
          cand.computeMeanSquaredDeviation(mat);
          if(LOG.isDebuggingFine()) {
            LOG.debugFine("Residue in Alg 3: " + cand.residue + " " + cand.rowcard + "x" + cand.colcard);
          }
        }
        if(!added[0] && !added[1]) {
          break;
        }
      }
    }