Esempio n. 1
0
 /**
  * Returns the row of the item matrix corresponding to the given item.
  *
  * @param i item
  * @return row of the item matrix
  */
 public DoubleMatrix1D getItemVector(I i) {
   int iidx = item2iidx(i);
   if (iidx < 0) {
     return null;
   } else {
     return itemMatrix.viewRow(iidx);
   }
 }
Esempio n. 2
0
 /**
  * Returns the row of the user matrix corresponding to the given user.
  *
  * @param u user
  * @return row of the user matrix
  */
 public DoubleMatrix1D getUserVector(U u) {
   int uidx = user2uidx(u);
   if (uidx < 0) {
     return null;
   } else {
     return userMatrix.viewRow(uidx);
   }
 }