Examples of NoSuchItemException


Examples of org.apache.mahout.cf.taste.common.NoSuchItemException

 
  @Override
  public PreferenceArray getPreferencesForItem(long itemID) throws NoSuchItemException {
    PreferenceArray prefs = preferenceForItems.get(itemID);
    if (prefs == null) {
      throw new NoSuchItemException();
    }
    return prefs;
  }
View Full Code Here

Examples of org.apache.mahout.cf.taste.common.NoSuchItemException

    if (useridx == null) {
      throw new NoSuchUserException();
    }
    Integer itemidx = itemMap.get(itemID);
    if (itemidx == null) {
      throw new NoSuchItemException();
    }
    return predictRating(useridx, itemidx);
  }
View Full Code Here

Examples of org.apache.mahout.cf.taste.common.NoSuchItemException

 
  @Override
  public PreferenceArray getPreferencesForItem(long itemID) throws NoSuchItemException {
    FastIDSet userIDs = preferenceForItems.get(itemID);
    if (userIDs == null) {
      throw new NoSuchItemException();
    }
    PreferenceArray prefArray = new BooleanItemPreferenceArray(userIDs.size());
    int i = 0;
    LongPrimitiveIterator it = userIDs.iterator();
    while (it.hasNext()) {
View Full Code Here

Examples of org.apache.mahout.cf.taste.common.NoSuchItemException

        return newPreferenceArray;
      }
    }
    if (delegatePrefs == null) {
      // No, didn't find it among the anonymous user prefs
      throw new NoSuchItemException(itemID);
    }
    return delegatePrefs;
  }
View Full Code Here

Examples of org.apache.mahout.cf.taste.common.NoSuchItemException

    if (!add && !isIDInModel(userID)) {
      throw new NoSuchUserException();
    }
    for (List<String> item : items) {
      if (!add && !isIDInModel(item.get(0))) {
        throw new NoSuchItemException();
      }
    }
  }
View Full Code Here

Examples of org.apache.mahout.cf.taste.common.NoSuchItemException

        return newPreferenceArray;
      }
    }
    if (delegatePrefs == null) {
      // No, didn't find it among the anonymous user prefs
      throw new NoSuchItemException();
    }
    return delegatePrefs;
  }
View Full Code Here

Examples of org.apache.mahout.cf.taste.common.NoSuchItemException

 
  @Override
  public PreferenceArray getPreferencesForItem(long itemID) throws NoSuchItemException {
    PreferenceArray prefs = preferenceForItems.get(itemID);
    if (prefs == null) {
      throw new NoSuchItemException();
    }
    return prefs;
  }
View Full Code Here

Examples of org.apache.mahout.cf.taste.common.NoSuchItemException

  @Override
  public PreferenceArray getPreferencesForItem(long itemID) throws TasteException {
    List<Preference> list = doGetPreferencesForItem(itemID);
    if (list.isEmpty()) {
      throw new NoSuchItemException();
    }
    return new GenericItemPreferenceArray(list);
  }
View Full Code Here

Examples of org.apache.mahout.cf.taste.common.NoSuchItemException

    if (useridx == null) {
      throw new NoSuchUserException();
    }
    Integer itemidx = itemMap.get(itemID);
    if (itemidx == null) {
      throw new NoSuchItemException();
    }
    return predictRating(useridx, itemidx);
  }
View Full Code Here

Examples of org.apache.mahout.cf.taste.common.NoSuchItemException

   */
  @Override
  public Item getItem(Object id) throws NoSuchItemException {
    Item item = itemMap.get(id);
    if (item == null) {
      throw new NoSuchItemException();
    }
    return item;
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.