/**
   * Creates a matrix to process genre data and generate the first factor of the proximity matrix
   * needed for a {@code HIRItemScorer}.
   *
   * @param dao The DataAccessObject interfacing with the item data for the model
   * @param gDao The genreDataAccessObject interfacing with the genre data for the model
   */
  public RowStochasticFactorOfProximity(ItemDAO dao, ItemGenreDAO gDao) {
    LongSet items = dao.getItemIds();
    int genreSize = gDao.getGenreSize();
    itemSize = items.size();
    double[][] data = new double[itemSize][genreSize];

    rowStochastic = MatrixUtils.createRealMatrix(data);

    int i = 0;
    LongIterator iter = items.iterator();
    while (iter.hasNext()) {
      long item = iter.nextLong();
      rowStochastic.setRowVector(i, gDao.getItemGenre(item));
      i++;
    }
  }