code: public void histogramToStructure(int histogram[] ) {
          col_idx[0] = 0;
          int index = 0;
          for (int i = 1; i <= numCols; i++) {
              col_idx[i] = index += histogram[i-1];
          }
          nz_length = index;
          growMaxLength( nz_length , false);
          if( col_idx[numCols] != nz_length )
              throw new RuntimeException("Egads");
      }
docs: Given the histogram of columns compute the col_idx for the matrix.  nz_length is automatically set and
  nz_values will grow if needed.
  @param histogram histogram of column values in the sparse matrix. modified, see above.