mahout-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sro...@apache.org
Subject svn commit: r805402 - /lucene/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/model/GenericBooleanPrefDataModel.java
Date Tue, 18 Aug 2009 13:08:09 GMT
Author: srowen
Date: Tue Aug 18 13:08:08 2009
New Revision: 805402

URL: http://svn.apache.org/viewvc?rev=805402&view=rev
Log:
Fixed dumb infinite loop bug (and cleaned up a few exception signatures)

Modified:
    lucene/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/model/GenericBooleanPrefDataModel.java

Modified: lucene/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/model/GenericBooleanPrefDataModel.java
URL: http://svn.apache.org/viewvc/lucene/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/model/GenericBooleanPrefDataModel.java?rev=805402&r1=805401&r2=805402&view=diff
==============================================================================
--- lucene/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/model/GenericBooleanPrefDataModel.java
(original)
+++ lucene/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/model/GenericBooleanPrefDataModel.java
Tue Aug 18 13:08:08 2009
@@ -112,7 +112,7 @@
     return data;
   }
 
-  public static FastByIDMap<FastIDSet> toDataMap(FastByIDMap<PreferenceArray>
data) throws TasteException {
+  public static FastByIDMap<FastIDSet> toDataMap(FastByIDMap<PreferenceArray>
data) {
     for (Map.Entry<Long, Object> entry : ((FastByIDMap<Object>) (FastByIDMap<?>)
data).entrySet()) {
       PreferenceArray prefArray = (PreferenceArray) entry.getValue();
       int size = prefArray.length();
@@ -180,7 +180,7 @@
   }
 
   @Override
-  public Float getPreferenceValue(long userID, long itemID) throws NoSuchUserException, NoSuchItemException
{
+  public Float getPreferenceValue(long userID, long itemID) throws NoSuchUserException {
     FastIDSet itemIDs = preferenceFromUsers.get(userID);
     if (itemIDs == null) {
       throw new NoSuchUserException();
@@ -219,17 +219,18 @@
         throw new NoSuchItemException();
       }
       intersection.retainAll(userIDs);
+      i++;
     }
     return intersection.size();
   }
 
   @Override
-  public void removePreference(long userID, long itemID) throws NoSuchUserException {
+  public void removePreference(long userID, long itemID) {
     throw new UnsupportedOperationException();
   }
 
   @Override
-  public void setPreference(long userID, long itemID, float value) throws NoSuchUserException
{
+  public void setPreference(long userID, long itemID, float value) {
     throw new UnsupportedOperationException();
   }
 



Mime
View raw message