docs: public static void solve(DMatrixSparseCSC G, boolean lower,
                               DMatrixSparseCSC B, DMatrixSparseCSC X,
                               @Nullable int pinv[] ,
                               @Nullable DGrowArray g_x, @Nullable IGrowArray g_xi, @Nullable IGrowArray g_w)
      {
          double[] x = UtilEjml.adjust(g_x,G.numRows);
          if( g_xi == null ) g_xi = new IGrowArray();
          int[] xi = UtilEjml.adjust(g_xi,G.numRows);
          int[] w = UtilEjml.adjust(g_w,G.numCols*2, G.numCols);
  
          X.nz_length = 0;
          X.col_idx[0] = 0;
          X.indicesSorted = false;
  
          for (int colB = 0; colB < B.numCols; colB++) {
              int top = solveColB(G,lower,B,colB, x, pinv,g_xi, w);
  
              int nz_count = X.numRows-top;
              if( X.nz_values.length < X.nz_length + nz_count) {
                  X.growMaxLength(X.nz_length*2 + nz_count,true);
              }
  
              for (int p = top; p < X.numRows; p++,X.nz_length++) {
                  X.nz_rows[X.nz_length] = xi[p];
                  X.nz_values[X.nz_length] = x[xi[p]];
              }
              X.col_idx[colB+1] = X.nz_length;
          }
      }