mahout-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sro...@apache.org
Subject svn commit: r1089773 - in /mahout/trunk: core/src/main/java/org/apache/mahout/cf/taste/impl/model/ core/src/main/java/org/apache/mahout/cf/taste/impl/recommender/ core/src/main/java/org/apache/mahout/cf/taste/impl/similarity/ core/src/main/java/org/apa...
Date Thu, 07 Apr 2011 08:31:14 GMT
Author: srowen
Date: Thu Apr  7 08:31:12 2011
New Revision: 1089773

URL: http://svn.apache.org/viewvc?rev=1089773&view=rev
Log:
More changes for FindBugs / inspections / PMD / checkstyle

Modified:
    mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/model/BooleanItemPreferenceArray.java
    mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/model/BooleanUserPreferenceArray.java
    mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/model/GenericItemPreferenceArray.java
    mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/model/GenericUserPreferenceArray.java
    mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/recommender/GenericItemBasedRecommender.java
    mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/similarity/AbstractItemSimilarity.java
    mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/similarity/AbstractSimilarity.java
    mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/similarity/CityBlockSimilarity.java
    mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/similarity/GenericItemSimilarity.java
    mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/similarity/LogLikelihoodSimilarity.java
    mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/similarity/TanimotoCoefficientSimilarity.java
    mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/similarity/jdbc/AbstractJDBCInMemoryItemSimilarity.java
    mahout/trunk/core/src/main/java/org/apache/mahout/clustering/DistanceMeasureCluster.java
    mahout/trunk/core/src/main/java/org/apache/mahout/clustering/dirichlet/DirichletDriver.java
    mahout/trunk/core/src/main/java/org/apache/mahout/clustering/dirichlet/DirichletState.java
    mahout/trunk/core/src/test/java/org/apache/mahout/cf/taste/hadoop/als/ParallelALSFactorizationJobTest.java
    mahout/trunk/core/src/test/java/org/apache/mahout/cf/taste/impl/neighborhood/DummySimilarity.java
    mahout/trunk/core/src/test/java/org/apache/mahout/cf/taste/impl/recommender/AllUnknownItemsCandidateItemsStrategyTest.java
    mahout/trunk/core/src/test/java/org/apache/mahout/cf/taste/impl/recommender/GenericItemBasedRecommenderTest.java
    mahout/trunk/core/src/test/java/org/apache/mahout/cf/taste/impl/recommender/PreferredItemsNeighborhoodCandidateItemsStrategyTest.java
    mahout/trunk/core/src/test/java/org/apache/mahout/cf/taste/impl/recommender/svd/ALSWRFactorizerTest.java
    mahout/trunk/core/src/test/java/org/apache/mahout/cf/taste/impl/recommender/svd/SVDRecommenderTest.java
    mahout/trunk/core/src/test/java/org/apache/mahout/cf/taste/impl/similarity/GenericItemSimilarityTest.java
    mahout/trunk/core/src/test/java/org/apache/mahout/cf/taste/impl/similarity/jdbc/MySQLJDBCInMemoryItemSimilarityTest.java
    mahout/trunk/core/src/test/java/org/apache/mahout/classifier/naivebayes/NaiveBayesTestBase.java
    mahout/trunk/core/src/test/java/org/apache/mahout/clustering/kmeans/TestKmeansClustering.java
    mahout/trunk/examples/src/main/java/org/apache/mahout/cf/taste/example/kddcup/track2/TrackItemSimilarity.java
    mahout/trunk/examples/src/main/java/org/apache/mahout/clustering/syntheticcontrol/dirichlet/Job.java
    mahout/trunk/math/src/main/java/org/apache/mahout/math/MatrixVectorView.java
    mahout/trunk/math/src/main/java/org/apache/mahout/math/Vector.java
    mahout/trunk/math/src/main/java/org/apache/mahout/math/VectorList.java
    mahout/trunk/math/src/main/java/org/apache/mahout/math/decomposer/lanczos/LanczosSolver.java
    mahout/trunk/math/src/main/java/org/apache/mahout/math/matrix/DoubleMatrix1D.java
    mahout/trunk/math/src/main/java/org/apache/mahout/math/matrix/impl/SparseDoubleMatrix1D.java
    mahout/trunk/math/src/main/java/org/apache/mahout/math/ssvd/EigenSolverWrapper.java
    mahout/trunk/math/src/test/java/org/apache/mahout/math/decomposer/SolverTest.java
    mahout/trunk/math/src/test/java/org/apache/mahout/math/decomposer/lanczos/TestLanczosSolver.java
    mahout/trunk/utils/src/test/java/org/apache/mahout/clustering/TestClusterDumper.java
    mahout/trunk/utils/src/test/java/org/apache/mahout/clustering/cdbw/TestCDbwEvaluator.java
    mahout/trunk/utils/src/test/java/org/apache/mahout/text/SequenceFilesFromMailArchivesTest.java

Modified: mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/model/BooleanItemPreferenceArray.java
URL: http://svn.apache.org/viewvc/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/model/BooleanItemPreferenceArray.java?rev=1089773&r1=1089772&r2=1089773&view=diff
==============================================================================
--- mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/model/BooleanItemPreferenceArray.java (original)
+++ mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/model/BooleanItemPreferenceArray.java Thu Apr  7 08:31:12 2011
@@ -45,7 +45,7 @@ public final class BooleanItemPreference
     this.id = Long.MIN_VALUE; // as a sort of 'unspecified' value
   }
   
-  public BooleanItemPreferenceArray(List<Preference> prefs, boolean forOneUser) {
+  public BooleanItemPreferenceArray(List<? extends Preference> prefs, boolean forOneUser) {
     this(prefs.size());
     int size = prefs.size();
     for (int i = 0; i < size; i++) {

Modified: mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/model/BooleanUserPreferenceArray.java
URL: http://svn.apache.org/viewvc/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/model/BooleanUserPreferenceArray.java?rev=1089773&r1=1089772&r2=1089773&view=diff
==============================================================================
--- mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/model/BooleanUserPreferenceArray.java (original)
+++ mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/model/BooleanUserPreferenceArray.java Thu Apr  7 08:31:12 2011
@@ -45,7 +45,7 @@ public final class BooleanUserPreference
     this.id = Long.MIN_VALUE; // as a sort of 'unspecified' value
   }
   
-  public BooleanUserPreferenceArray(List<Preference> prefs) {
+  public BooleanUserPreferenceArray(List<? extends Preference> prefs) {
     this(prefs.size());
     int size = prefs.size();
     for (int i = 0; i < size; i++) {

Modified: mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/model/GenericItemPreferenceArray.java
URL: http://svn.apache.org/viewvc/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/model/GenericItemPreferenceArray.java?rev=1089773&r1=1089772&r2=1089773&view=diff
==============================================================================
--- mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/model/GenericItemPreferenceArray.java (original)
+++ mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/model/GenericItemPreferenceArray.java Thu Apr  7 08:31:12 2011
@@ -51,7 +51,7 @@ public final class GenericItemPreference
     this.id = Long.MIN_VALUE; // as a sort of 'unspecified' value
   }
   
-  public GenericItemPreferenceArray(List<Preference> prefs) {
+  public GenericItemPreferenceArray(List<? extends Preference> prefs) {
     this(prefs.size());
     int size = prefs.size();
     long itemID = Long.MIN_VALUE;

Modified: mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/model/GenericUserPreferenceArray.java
URL: http://svn.apache.org/viewvc/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/model/GenericUserPreferenceArray.java?rev=1089773&r1=1089772&r2=1089773&view=diff
==============================================================================
--- mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/model/GenericUserPreferenceArray.java (original)
+++ mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/model/GenericUserPreferenceArray.java Thu Apr  7 08:31:12 2011
@@ -57,7 +57,7 @@ public final class GenericUserPreference
     this.id = Long.MIN_VALUE; // as a sort of 'unspecified' value
   }
   
-  public GenericUserPreferenceArray(List<Preference> prefs) {
+  public GenericUserPreferenceArray(List<? extends Preference> prefs) {
     this(prefs.size());
     int size = prefs.size();
     long userID = Long.MIN_VALUE;

Modified: mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/recommender/GenericItemBasedRecommender.java
URL: http://svn.apache.org/viewvc/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/recommender/GenericItemBasedRecommender.java?rev=1089773&r1=1089772&r2=1089773&view=diff
==============================================================================
--- mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/recommender/GenericItemBasedRecommender.java (original)
+++ mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/recommender/GenericItemBasedRecommender.java Thu Apr  7 08:31:12 2011
@@ -143,7 +143,7 @@ public class GenericItemBasedRecommender
     return doEstimatePreference(userID, preferencesFromUser, itemID);
   }
 
-  private Float getPreferenceForItem(PreferenceArray preferencesFromUser, long itemID) {
+  private static Float getPreferenceForItem(PreferenceArray preferencesFromUser, long itemID) {
     int size = preferencesFromUser.length();
     for (int i = 0; i < size; i++) {
       if (preferencesFromUser.getItemID(i) == itemID) {

Modified: mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/similarity/AbstractItemSimilarity.java
URL: http://svn.apache.org/viewvc/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/similarity/AbstractItemSimilarity.java?rev=1089773&r1=1089772&r2=1089773&view=diff
==============================================================================
--- mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/similarity/AbstractItemSimilarity.java (original)
+++ mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/similarity/AbstractItemSimilarity.java Thu Apr  7 08:31:12 2011
@@ -30,16 +30,20 @@ import java.util.Collection;
 
 public abstract class AbstractItemSimilarity implements ItemSimilarity {
 
-  protected final DataModel dataModel;
+  private final DataModel dataModel;
   private final RefreshHelper refreshHelper;
 
-  public AbstractItemSimilarity(DataModel dataModel) {
+  protected AbstractItemSimilarity(DataModel dataModel) {
     Preconditions.checkArgument(dataModel != null, "dataModel is null");
     this.dataModel = dataModel;
     this.refreshHelper = new RefreshHelper(null);
     refreshHelper.addDependency(this.dataModel);
   }
 
+  protected DataModel getDataModel() {
+    return dataModel;
+  }
+
   @Override
   public long[] allSimilarItemIDs(long itemID) throws TasteException {
     FastIDSet allSimilarItemIDs = new FastIDSet();

Modified: mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/similarity/AbstractSimilarity.java
URL: http://svn.apache.org/viewvc/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/similarity/AbstractSimilarity.java?rev=1089773&r1=1089772&r2=1089773&view=diff
==============================================================================
--- mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/similarity/AbstractSimilarity.java (original)
+++ mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/similarity/AbstractSimilarity.java Thu Apr  7 08:31:12 2011
@@ -132,6 +132,7 @@ abstract class AbstractSimilarity extend
   
   @Override
   public double userSimilarity(long userID1, long userID2) throws TasteException {
+    DataModel dataModel = getDataModel();
     PreferenceArray xPrefs = dataModel.getPreferencesFromUser(userID1);
     PreferenceArray yPrefs = dataModel.getPreferencesFromUser(userID2);
     int xLength = xPrefs.length();
@@ -261,6 +262,7 @@ abstract class AbstractSimilarity extend
   
   @Override
   public final double itemSimilarity(long itemID1, long itemID2) throws TasteException {
+    DataModel dataModel = getDataModel();
     PreferenceArray xPrefs = dataModel.getPreferencesForItem(itemID1);
     PreferenceArray yPrefs = dataModel.getPreferencesForItem(itemID2);
     int xLength = xPrefs.length();
@@ -377,7 +379,7 @@ abstract class AbstractSimilarity extend
   
   @Override
   public final String toString() {
-    return this.getClass().getSimpleName() + "[dataModel:" + dataModel + ",inferrer:" + inferrer + ']';
+    return this.getClass().getSimpleName() + "[dataModel:" + getDataModel() + ",inferrer:" + inferrer + ']';
   }
   
 }

Modified: mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/similarity/CityBlockSimilarity.java
URL: http://svn.apache.org/viewvc/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/similarity/CityBlockSimilarity.java?rev=1089773&r1=1089772&r2=1089773&view=diff
==============================================================================
--- mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/similarity/CityBlockSimilarity.java (original)
+++ mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/similarity/CityBlockSimilarity.java Thu Apr  7 08:31:12 2011
@@ -47,11 +47,12 @@ public final class CityBlockSimilarity e
   @Override
   public void refresh(Collection<Refreshable> alreadyRefreshed) {
     alreadyRefreshed = RefreshHelper.buildRefreshed(alreadyRefreshed);
-    RefreshHelper.maybeRefresh(alreadyRefreshed, dataModel);
+    RefreshHelper.maybeRefresh(alreadyRefreshed, getDataModel());
   }
 
   @Override
   public double itemSimilarity(long itemID1, long itemID2) throws TasteException {
+    DataModel dataModel = getDataModel();
     int preferring1 = dataModel.getNumUsersWithPreferenceFor(itemID1);
     int preferring2 = dataModel.getNumUsersWithPreferenceFor(itemID2);
     int intersection = dataModel.getNumUsersWithPreferenceFor(itemID1, itemID2);
@@ -60,6 +61,7 @@ public final class CityBlockSimilarity e
 
   @Override
   public double[] itemSimilarities(long itemID1, long[] itemID2s) throws TasteException {
+    DataModel dataModel = getDataModel();
     int preferring1 = dataModel.getNumUsersWithPreferenceFor(itemID1);
     double[] distance = new double[itemID2s.length];
     for (int i = 0; i < itemID2s.length; ++i) {
@@ -72,6 +74,7 @@ public final class CityBlockSimilarity e
 
   @Override
   public double userSimilarity(long userID1, long userID2) throws TasteException {
+    DataModel dataModel = getDataModel();
     FastIDSet prefs1 = dataModel.getItemIDsFromUser(userID1);
     FastIDSet prefs2 = dataModel.getItemIDsFromUser(userID2);
     int prefs1Size = prefs1.size();

Modified: mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/similarity/GenericItemSimilarity.java
URL: http://svn.apache.org/viewvc/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/similarity/GenericItemSimilarity.java?rev=1089773&r1=1089772&r2=1089773&view=diff
==============================================================================
--- mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/similarity/GenericItemSimilarity.java (original)
+++ mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/similarity/GenericItemSimilarity.java Thu Apr  7 08:31:12 2011
@@ -49,6 +49,8 @@ import com.google.common.base.Preconditi
  * </p>
  */
 public final class GenericItemSimilarity implements ItemSimilarity {
+
+  private static final long[] NO_IDS = new long[0];
   
   private final FastByIDMap<FastByIDMap<Double>> similarityMaps = new FastByIDMap<FastByIDMap<Double>>();
   private final FastByIDMap<FastIDSet> similarItemIDsIndex = new FastByIDMap<FastIDSet>();
@@ -235,9 +237,9 @@ public GenericItemSimilarity(ItemSimilar
   }
 
   @Override
-  public long[] allSimilarItemIDs(long itemID) throws TasteException {
+  public long[] allSimilarItemIDs(long itemID) {
     FastIDSet similarItemIDs = similarItemIDsIndex.get(itemID);
-    return similarItemIDs != null ? similarItemIDs.toArray() : new long[0];
+    return similarItemIDs != null ? similarItemIDs.toArray() : NO_IDS;
   }
   
   @Override

Modified: mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/similarity/LogLikelihoodSimilarity.java
URL: http://svn.apache.org/viewvc/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/similarity/LogLikelihoodSimilarity.java?rev=1089773&r1=1089772&r2=1089773&view=diff
==============================================================================
--- mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/similarity/LogLikelihoodSimilarity.java (original)
+++ mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/similarity/LogLikelihoodSimilarity.java Thu Apr  7 08:31:12 2011
@@ -50,7 +50,8 @@ public final class LogLikelihoodSimilari
   
   @Override
   public double userSimilarity(long userID1, long userID2) throws TasteException {
-    
+
+    DataModel dataModel = getDataModel();
     FastIDSet prefs1 = dataModel.getItemIDsFromUser(userID1);
     FastIDSet prefs2 = dataModel.getItemIDsFromUser(userID2);
     
@@ -72,6 +73,7 @@ public final class LogLikelihoodSimilari
   
   @Override
   public double itemSimilarity(long itemID1, long itemID2) throws TasteException {
+    DataModel dataModel = getDataModel();
     int preferring1 = dataModel.getNumUsersWithPreferenceFor(itemID1);
     int numUsers = dataModel.getNumUsers();    
     return doItemSimilarity(itemID1, itemID2, preferring1, numUsers);
@@ -79,6 +81,7 @@ public final class LogLikelihoodSimilari
 
   @Override
   public double[] itemSimilarities(long itemID1, long[] itemID2s) throws TasteException {
+    DataModel dataModel = getDataModel();
     int preferring1 = dataModel.getNumUsersWithPreferenceFor(itemID1);
     int numUsers = dataModel.getNumUsers();
     int length = itemID2s.length;
@@ -90,6 +93,7 @@ public final class LogLikelihoodSimilari
   }
 
   private double doItemSimilarity(long itemID1, long itemID2, int preferring1, int numUsers) throws TasteException {
+    DataModel dataModel = getDataModel();
     int preferring1and2 = dataModel.getNumUsersWithPreferenceFor(itemID1, itemID2);
     if (preferring1and2 == 0) {
       return Double.NaN;
@@ -106,12 +110,12 @@ public final class LogLikelihoodSimilari
   @Override
   public void refresh(Collection<Refreshable> alreadyRefreshed) {
     alreadyRefreshed = RefreshHelper.buildRefreshed(alreadyRefreshed);
-    RefreshHelper.maybeRefresh(alreadyRefreshed, dataModel);
+    RefreshHelper.maybeRefresh(alreadyRefreshed, getDataModel());
   }
   
   @Override
   public String toString() {
-    return "LogLikelihoodSimilarity[dataModel:" + dataModel + ']';
+    return "LogLikelihoodSimilarity[dataModel:" + getDataModel() + ']';
   }
   
 }
\ No newline at end of file

Modified: mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/similarity/TanimotoCoefficientSimilarity.java
URL: http://svn.apache.org/viewvc/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/similarity/TanimotoCoefficientSimilarity.java?rev=1089773&r1=1089772&r2=1089773&view=diff
==============================================================================
--- mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/similarity/TanimotoCoefficientSimilarity.java (original)
+++ mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/similarity/TanimotoCoefficientSimilarity.java Thu Apr  7 08:31:12 2011
@@ -60,7 +60,8 @@ public final class TanimotoCoefficientSi
   
   @Override
   public double userSimilarity(long userID1, long userID2) throws TasteException {
-    
+
+    DataModel dataModel = getDataModel();
     FastIDSet xPrefs = dataModel.getItemIDsFromUser(userID1);
     FastIDSet yPrefs = dataModel.getItemIDsFromUser(userID2);
     
@@ -83,13 +84,13 @@ public final class TanimotoCoefficientSi
   
   @Override
   public double itemSimilarity(long itemID1, long itemID2) throws TasteException {
-    int preferring1 = dataModel.getNumUsersWithPreferenceFor(itemID1);
+    int preferring1 = getDataModel().getNumUsersWithPreferenceFor(itemID1);
     return doItemSimilarity(itemID1, itemID2, preferring1);
   }
 
   @Override
   public double[] itemSimilarities(long itemID1, long[] itemID2s) throws TasteException {
-    int preferring1 = dataModel.getNumUsersWithPreferenceFor(itemID1);
+    int preferring1 = getDataModel().getNumUsersWithPreferenceFor(itemID1);
     int length = itemID2s.length;
     double[] result = new double[length];
     for (int i = 0; i < length; i++) {
@@ -99,6 +100,7 @@ public final class TanimotoCoefficientSi
   }
 
   private double doItemSimilarity(long itemID1, long itemID2, int preferring1) throws TasteException {
+    DataModel dataModel = getDataModel();
     int preferring1and2 = dataModel.getNumUsersWithPreferenceFor(itemID1, itemID2);
     int preferring2 = dataModel.getNumUsersWithPreferenceFor(itemID2);
     return (double) preferring1and2 / (double) (preferring1 + preferring2 - preferring1and2);
@@ -107,12 +109,12 @@ public final class TanimotoCoefficientSi
   @Override
   public void refresh(Collection<Refreshable> alreadyRefreshed) {
     alreadyRefreshed = RefreshHelper.buildRefreshed(alreadyRefreshed);
-    RefreshHelper.maybeRefresh(alreadyRefreshed, dataModel);
+    RefreshHelper.maybeRefresh(alreadyRefreshed, getDataModel());
   }
   
   @Override
   public String toString() {
-    return "TanimotoCoefficientSimilarity[dataModel:" + dataModel + ']';
+    return "TanimotoCoefficientSimilarity[dataModel:" + getDataModel() + ']';
   }
   
 }
\ No newline at end of file

Modified: mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/similarity/jdbc/AbstractJDBCInMemoryItemSimilarity.java
URL: http://svn.apache.org/viewvc/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/similarity/jdbc/AbstractJDBCInMemoryItemSimilarity.java?rev=1089773&r1=1089772&r2=1089773&view=diff
==============================================================================
--- mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/similarity/jdbc/AbstractJDBCInMemoryItemSimilarity.java (original)
+++ mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/similarity/jdbc/AbstractJDBCInMemoryItemSimilarity.java Thu Apr  7 08:31:12 2011
@@ -34,6 +34,7 @@ import java.sql.ResultSet;
 import java.sql.SQLException;
 import java.util.Collection;
 import java.util.Iterator;
+import java.util.NoSuchElementException;
 import java.util.concurrent.locks.ReentrantLock;
 
 /**
@@ -49,7 +50,7 @@ abstract class AbstractJDBCInMemoryItemS
 
   private static final Logger log = LoggerFactory.getLogger(AbstractJDBCInMemoryItemSimilarity.class);
 
-  public AbstractJDBCInMemoryItemSimilarity(DataSource dataSource, String getAllItemSimilaritiesSQL) {
+  AbstractJDBCInMemoryItemSimilarity(DataSource dataSource, String getAllItemSimilaritiesSQL) {
 
     AbstractJDBCComponent.checkNotNullAndLog("getAllItemSimilaritiesSQL", getAllItemSimilaritiesSQL);
 
@@ -149,6 +150,9 @@ abstract class AbstractJDBCInMemoryItemS
 
     @Override
     public GenericItemSimilarity.ItemItemSimilarity next() {
+      if (!hasNext()) {
+        throw new NoSuchElementException();
+      }
       try {
         GenericItemSimilarity.ItemItemSimilarity similarity = new GenericItemSimilarity.ItemItemSimilarity(
             resultSet.getLong(1), resultSet.getLong(2), resultSet.getDouble(3));

Modified: mahout/trunk/core/src/main/java/org/apache/mahout/clustering/DistanceMeasureCluster.java
URL: http://svn.apache.org/viewvc/mahout/trunk/core/src/main/java/org/apache/mahout/clustering/DistanceMeasureCluster.java?rev=1089773&r1=1089772&r2=1089773&view=diff
==============================================================================
--- mahout/trunk/core/src/main/java/org/apache/mahout/clustering/DistanceMeasureCluster.java (original)
+++ mahout/trunk/core/src/main/java/org/apache/mahout/clustering/DistanceMeasureCluster.java Thu Apr  7 08:31:12 2011
@@ -20,12 +20,9 @@ package org.apache.mahout.clustering;
 import java.io.DataInput;
 import java.io.DataOutput;
 import java.io.IOException;
-import java.util.Collection;
-import java.util.Collections;
 
 import org.apache.hadoop.conf.Configuration;
 import org.apache.mahout.common.distance.DistanceMeasure;
-import org.apache.mahout.common.parameters.Parameter;
 import org.apache.mahout.math.Vector;
 import org.apache.mahout.math.VectorWritable;
 
@@ -47,16 +44,6 @@ public class DistanceMeasureCluster exte
       getMeasure().configure(job);
     }
   }
-  
-  @Override
-  public Collection<Parameter<?>> getParameters() {
-    return Collections.emptyList();
-  }
-  
-  @Override
-  public void createParameters(String prefix, Configuration jobConf) {
-    // nothing to do
-  }
 
   @Override
   public void readFields(DataInput in) throws IOException {

Modified: mahout/trunk/core/src/main/java/org/apache/mahout/clustering/dirichlet/DirichletDriver.java
URL: http://svn.apache.org/viewvc/mahout/trunk/core/src/main/java/org/apache/mahout/clustering/dirichlet/DirichletDriver.java?rev=1089773&r1=1089772&r2=1089773&view=diff
==============================================================================
--- mahout/trunk/core/src/main/java/org/apache/mahout/clustering/dirichlet/DirichletDriver.java (original)
+++ mahout/trunk/core/src/main/java/org/apache/mahout/clustering/dirichlet/DirichletDriver.java Thu Apr  7 08:31:12 2011
@@ -18,8 +18,6 @@
 package org.apache.mahout.clustering.dirichlet;
 
 import java.io.IOException;
-import java.lang.reflect.Constructor;
-import java.lang.reflect.InvocationTargetException;
 import java.util.List;
 
 import org.apache.hadoop.conf.Configuration;
@@ -36,22 +34,17 @@ import org.apache.hadoop.mapreduce.lib.o
 import org.apache.hadoop.mapreduce.lib.output.SequenceFileOutputFormat;
 import org.apache.hadoop.util.ToolRunner;
 import org.apache.mahout.clustering.Cluster;
-import org.apache.mahout.clustering.ModelDistribution;
 import org.apache.mahout.clustering.WeightedVectorWritable;
-import org.apache.mahout.clustering.dirichlet.models.AbstractVectorModelDistribution;
-import org.apache.mahout.clustering.dirichlet.models.DistanceMeasureClusterDistribution;
 import org.apache.mahout.clustering.dirichlet.models.DistributionDescription;
 import org.apache.mahout.clustering.dirichlet.models.NormalModelDistribution;
 import org.apache.mahout.common.AbstractJob;
 import org.apache.mahout.common.HadoopUtil;
 import org.apache.mahout.common.commandline.DefaultOptionCreator;
-import org.apache.mahout.common.distance.DistanceMeasure;
 import org.apache.mahout.common.iterator.sequencefile.PathFilters;
 import org.apache.mahout.common.iterator.sequencefile.PathType;
 import org.apache.mahout.common.iterator.sequencefile.SequenceFileDirValueIterable;
 import org.apache.mahout.common.iterator.sequencefile.SequenceFileValueIterable;
 import org.apache.mahout.math.RandomAccessSparseVector;
-import org.apache.mahout.math.Vector;
 import org.apache.mahout.math.VectorWritable;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;

Modified: mahout/trunk/core/src/main/java/org/apache/mahout/clustering/dirichlet/DirichletState.java
URL: http://svn.apache.org/viewvc/mahout/trunk/core/src/main/java/org/apache/mahout/clustering/dirichlet/DirichletState.java?rev=1089773&r1=1089772&r2=1089773&view=diff
==============================================================================
--- mahout/trunk/core/src/main/java/org/apache/mahout/clustering/dirichlet/DirichletState.java (original)
+++ mahout/trunk/core/src/main/java/org/apache/mahout/clustering/dirichlet/DirichletState.java Thu Apr  7 08:31:12 2011
@@ -38,7 +38,7 @@ public class DirichletState {
   
   private Vector mixture; // the mixture vector
   
-  private double alpha0; // alpha0
+  private final double alpha0; // alpha0
 
   public DirichletState(ModelDistribution<VectorWritable> modelFactory,
                         int numClusters,

Modified: mahout/trunk/core/src/test/java/org/apache/mahout/cf/taste/hadoop/als/ParallelALSFactorizationJobTest.java
URL: http://svn.apache.org/viewvc/mahout/trunk/core/src/test/java/org/apache/mahout/cf/taste/hadoop/als/ParallelALSFactorizationJobTest.java?rev=1089773&r1=1089772&r2=1089773&view=diff
==============================================================================
--- mahout/trunk/core/src/test/java/org/apache/mahout/cf/taste/hadoop/als/ParallelALSFactorizationJobTest.java (original)
+++ mahout/trunk/core/src/test/java/org/apache/mahout/cf/taste/hadoop/als/ParallelALSFactorizationJobTest.java Thu Apr  7 08:31:12 2011
@@ -276,7 +276,7 @@ public class ParallelALSFactorizationJob
     double rmse = Math.sqrt(avg.getAverage());
     logger.info("RMSE: " + rmse);
 
-    assertTrue(rmse < 0.2d);
+    assertTrue(rmse < 0.2);
   }
 
 }

Modified: mahout/trunk/core/src/test/java/org/apache/mahout/cf/taste/impl/neighborhood/DummySimilarity.java
URL: http://svn.apache.org/viewvc/mahout/trunk/core/src/test/java/org/apache/mahout/cf/taste/impl/neighborhood/DummySimilarity.java?rev=1089773&r1=1089772&r2=1089773&view=diff
==============================================================================
--- mahout/trunk/core/src/test/java/org/apache/mahout/cf/taste/impl/neighborhood/DummySimilarity.java (original)
+++ mahout/trunk/core/src/test/java/org/apache/mahout/cf/taste/impl/neighborhood/DummySimilarity.java Thu Apr  7 08:31:12 2011
@@ -19,11 +19,8 @@ package org.apache.mahout.cf.taste.impl.
 
 import org.apache.mahout.cf.taste.common.Refreshable;
 import org.apache.mahout.cf.taste.common.TasteException;
-import org.apache.mahout.cf.taste.impl.common.FastIDSet;
-import org.apache.mahout.cf.taste.impl.common.LongPrimitiveIterator;
 import org.apache.mahout.cf.taste.impl.similarity.AbstractItemSimilarity;
 import org.apache.mahout.cf.taste.model.DataModel;
-import org.apache.mahout.cf.taste.similarity.ItemSimilarity;
 import org.apache.mahout.cf.taste.similarity.PreferenceInferrer;
 import org.apache.mahout.cf.taste.similarity.UserSimilarity;
 
@@ -37,6 +34,7 @@ final class DummySimilarity extends Abst
   
   @Override
   public double userSimilarity(long userID1, long userID2) throws TasteException {
+    DataModel dataModel = getDataModel();
     return 1.0 / (1.0 + Math.abs(dataModel.getPreferencesFromUser(userID1).get(0).getValue()
                                  - dataModel.getPreferencesFromUser(userID2).get(0).getValue()));
   }

Modified: mahout/trunk/core/src/test/java/org/apache/mahout/cf/taste/impl/recommender/AllUnknownItemsCandidateItemsStrategyTest.java
URL: http://svn.apache.org/viewvc/mahout/trunk/core/src/test/java/org/apache/mahout/cf/taste/impl/recommender/AllUnknownItemsCandidateItemsStrategyTest.java?rev=1089773&r1=1089772&r2=1089773&view=diff
==============================================================================
--- mahout/trunk/core/src/test/java/org/apache/mahout/cf/taste/impl/recommender/AllUnknownItemsCandidateItemsStrategyTest.java (original)
+++ mahout/trunk/core/src/test/java/org/apache/mahout/cf/taste/impl/recommender/AllUnknownItemsCandidateItemsStrategyTest.java Thu Apr  7 08:31:12 2011
@@ -23,7 +23,7 @@ import org.apache.mahout.cf.taste.impl.c
 import org.apache.mahout.cf.taste.impl.model.GenericPreference;
 import org.apache.mahout.cf.taste.impl.model.GenericUserPreferenceArray;
 import org.apache.mahout.cf.taste.model.DataModel;
-import org.apache.mahout.cf.taste.model.Preference;
+import org.apache.mahout.cf.taste.model.PreferenceArray;
 import org.apache.mahout.cf.taste.recommender.CandidateItemsStrategy;
 import org.easymock.classextension.EasyMock;
 import org.junit.Test;
@@ -47,8 +47,8 @@ public final class AllUnknownItemsCandid
     EasyMock.expect(dataModel.getNumItems()).andReturn(3);
     EasyMock.expect(dataModel.getItemIDs()).andReturn(allItemIDs.iterator());
 
-    GenericUserPreferenceArray prefArrayOfUser123 = new GenericUserPreferenceArray(Arrays.asList(new Preference[]{
-        new GenericPreference(123L, 2L, 1.0f)}));
+    PreferenceArray prefArrayOfUser123 = new GenericUserPreferenceArray(Arrays.asList(
+        new GenericPreference(123L, 2L, 1.0f)));
 
     CandidateItemsStrategy strategy = new AllUnknownItemsCandidateItemsStrategy();
 

Modified: mahout/trunk/core/src/test/java/org/apache/mahout/cf/taste/impl/recommender/GenericItemBasedRecommenderTest.java
URL: http://svn.apache.org/viewvc/mahout/trunk/core/src/test/java/org/apache/mahout/cf/taste/impl/recommender/GenericItemBasedRecommenderTest.java?rev=1089773&r1=1089772&r2=1089773&view=diff
==============================================================================
--- mahout/trunk/core/src/test/java/org/apache/mahout/cf/taste/impl/recommender/GenericItemBasedRecommenderTest.java (original)
+++ mahout/trunk/core/src/test/java/org/apache/mahout/cf/taste/impl/recommender/GenericItemBasedRecommenderTest.java Thu Apr  7 08:31:12 2011
@@ -23,9 +23,12 @@ import org.apache.mahout.cf.taste.impl.m
 import org.apache.mahout.cf.taste.impl.model.GenericUserPreferenceArray;
 import org.apache.mahout.cf.taste.impl.similarity.GenericItemSimilarity;
 import org.apache.mahout.cf.taste.model.DataModel;
-import org.apache.mahout.cf.taste.model.Preference;
 import org.apache.mahout.cf.taste.model.PreferenceArray;
-import org.apache.mahout.cf.taste.recommender.*;
+import org.apache.mahout.cf.taste.recommender.CandidateItemsStrategy;
+import org.apache.mahout.cf.taste.recommender.ItemBasedRecommender;
+import org.apache.mahout.cf.taste.recommender.MostSimilarItemsCandidateItemsStrategy;
+import org.apache.mahout.cf.taste.recommender.RecommendedItem;
+import org.apache.mahout.cf.taste.recommender.Recommender;
 import org.apache.mahout.cf.taste.similarity.ItemSimilarity;
 import org.easymock.classextension.EasyMock;
 import org.junit.Test;
@@ -268,8 +271,8 @@ public final class GenericItemBasedRecom
     MostSimilarItemsCandidateItemsStrategy mostSimilarItemsCandidateItemsStrategy =
         EasyMock.createMock(MostSimilarItemsCandidateItemsStrategy.class);
 
-    PreferenceArray preferencesFromUser = new GenericUserPreferenceArray(Arrays.asList(new Preference[] {
-        new GenericPreference(1L, 1L, 5f), new GenericPreference(1L, 2L, 4f) }));
+    PreferenceArray preferencesFromUser = new GenericUserPreferenceArray(
+        Arrays.asList(new GenericPreference(1L, 1L, 5.0f), new GenericPreference(1L, 2L, 4.0f)));
 
     EasyMock.expect(dataModel.getMinPreference()).andReturn(Float.NaN);
     EasyMock.expect(dataModel.getMaxPreference()).andReturn(Float.NaN);
@@ -279,13 +282,13 @@ public final class GenericItemBasedRecom
         .andReturn(new FastIDSet(new long[] { 3L, 4L }));
 
     EasyMock.expect(itemSimilarity.itemSimilarities(3L, preferencesFromUser.getIDs()))
-        .andReturn(new double[] { 0.5d, 0.3d });
+        .andReturn(new double[] { 0.5, 0.3 });
     EasyMock.expect(itemSimilarity.itemSimilarities(4L, preferencesFromUser.getIDs()))
-        .andReturn(new double[] { 0.4d, 0.1d });
+        .andReturn(new double[] { 0.4, 0.1 });
 
     EasyMock.replay(dataModel, itemSimilarity, candidateItemsStrategy, mostSimilarItemsCandidateItemsStrategy);
 
-    ItemBasedRecommender recommender = new GenericItemBasedRecommender(dataModel, itemSimilarity,
+    Recommender recommender = new GenericItemBasedRecommender(dataModel, itemSimilarity,
         candidateItemsStrategy, mostSimilarItemsCandidateItemsStrategy);
 
     recommender.recommend(1L, 3);

Modified: mahout/trunk/core/src/test/java/org/apache/mahout/cf/taste/impl/recommender/PreferredItemsNeighborhoodCandidateItemsStrategyTest.java
URL: http://svn.apache.org/viewvc/mahout/trunk/core/src/test/java/org/apache/mahout/cf/taste/impl/recommender/PreferredItemsNeighborhoodCandidateItemsStrategyTest.java?rev=1089773&r1=1089772&r2=1089773&view=diff
==============================================================================
--- mahout/trunk/core/src/test/java/org/apache/mahout/cf/taste/impl/recommender/PreferredItemsNeighborhoodCandidateItemsStrategyTest.java (original)
+++ mahout/trunk/core/src/test/java/org/apache/mahout/cf/taste/impl/recommender/PreferredItemsNeighborhoodCandidateItemsStrategyTest.java Thu Apr  7 08:31:12 2011
@@ -57,8 +57,8 @@ public final class PreferredItemsNeighbo
     EasyMock.expect(dataModel.getItemIDsFromUser(123L)).andReturn(itemIDsFromUser123);
     EasyMock.expect(dataModel.getItemIDsFromUser(456L)).andReturn(itemIDsFromUser456);
 
-    GenericUserPreferenceArray prefArrayOfUser123 = new GenericUserPreferenceArray(Arrays.asList(new Preference[] {
-        new GenericPreference(123L, 1L, 1.0f) }));
+    PreferenceArray prefArrayOfUser123 =
+        new GenericUserPreferenceArray(Arrays.asList(new GenericPreference(123L, 1L, 1.0f)));
 
     CandidateItemsStrategy strategy = new PreferredItemsNeighborhoodCandidateItemsStrategy();
 

Modified: mahout/trunk/core/src/test/java/org/apache/mahout/cf/taste/impl/recommender/svd/ALSWRFactorizerTest.java
URL: http://svn.apache.org/viewvc/mahout/trunk/core/src/test/java/org/apache/mahout/cf/taste/impl/recommender/svd/ALSWRFactorizerTest.java?rev=1089773&r1=1089772&r2=1089773&view=diff
==============================================================================
--- mahout/trunk/core/src/test/java/org/apache/mahout/cf/taste/impl/recommender/svd/ALSWRFactorizerTest.java (original)
+++ mahout/trunk/core/src/test/java/org/apache/mahout/cf/taste/impl/recommender/svd/ALSWRFactorizerTest.java Thu Apr  7 08:31:12 2011
@@ -55,23 +55,19 @@ public class ALSWRFactorizerTest extends
     super.setUp();
     FastByIDMap<PreferenceArray> userData = new FastByIDMap<PreferenceArray>();
 
-    userData.put(1L, new GenericUserPreferenceArray(Arrays.asList(new Preference[] {
-        new GenericPreference(1L, 1L, 5.0f),
-        new GenericPreference(1L, 2L, 5.0f),
-        new GenericPreference(1L, 3L, 2.0f) })));
-
-    userData.put(2L, new GenericUserPreferenceArray(Arrays.asList(new Preference[] {
-        new GenericPreference(2L, 1L, 2.0f),
-        new GenericPreference(2L, 3L, 3.0f),
-        new GenericPreference(2L, 4L, 5.0f) })));
-
-    userData.put(3L, new GenericUserPreferenceArray(Arrays.asList(new Preference[] {
-        new GenericPreference(3L, 2L, 5.0f),
-        new GenericPreference(3L, 4L, 3.0f) })));
-
-    userData.put(4L, new GenericUserPreferenceArray(Arrays.asList(new Preference[] {
-        new GenericPreference(4L, 1L, 3.0f),
-        new GenericPreference(4L, 4L, 5.0f) })));
+    userData.put(1L, new GenericUserPreferenceArray(Arrays.asList(new GenericPreference(1L, 1L, 5.0f),
+                                                                  new GenericPreference(1L, 2L, 5.0f),
+                                                                  new GenericPreference(1L, 3L, 2.0f))));
+
+    userData.put(2L, new GenericUserPreferenceArray(Arrays.asList(new GenericPreference(2L, 1L, 2.0f),
+                                                                  new GenericPreference(2L, 3L, 3.0f),
+                                                                  new GenericPreference(2L, 4L, 5.0f))));
+
+    userData.put(3L, new GenericUserPreferenceArray(Arrays.asList(new GenericPreference(3L, 2L, 5.0f),
+                                                                  new GenericPreference(3L, 4L, 3.0f))));
+
+    userData.put(4L, new GenericUserPreferenceArray(Arrays.asList(new GenericPreference(4L, 1L, 3.0f),
+                                                                  new GenericPreference(4L, 4L, 5.0f))));
 
     dataModel = new GenericDataModel(userData);
     factorizer = new ALSWRFactorizer(dataModel, 3, 0.065, 10);
@@ -147,6 +143,6 @@ public class ALSWRFactorizerTest extends
     }
 
     double rmse = Math.sqrt(avg.getAverage());
-    assertTrue(rmse < 0.2d);
+    assertTrue(rmse < 0.2);
   }
 }

Modified: mahout/trunk/core/src/test/java/org/apache/mahout/cf/taste/impl/recommender/svd/SVDRecommenderTest.java
URL: http://svn.apache.org/viewvc/mahout/trunk/core/src/test/java/org/apache/mahout/cf/taste/impl/recommender/svd/SVDRecommenderTest.java?rev=1089773&r1=1089772&r2=1089773&view=diff
==============================================================================
--- mahout/trunk/core/src/test/java/org/apache/mahout/cf/taste/impl/recommender/svd/SVDRecommenderTest.java (original)
+++ mahout/trunk/core/src/test/java/org/apache/mahout/cf/taste/impl/recommender/svd/SVDRecommenderTest.java Thu Apr  7 08:31:12 2011
@@ -20,7 +20,6 @@ package org.apache.mahout.cf.taste.impl.
 import org.apache.mahout.cf.taste.impl.TasteTestCase;
 import org.apache.mahout.cf.taste.impl.common.FastIDSet;
 import org.apache.mahout.cf.taste.model.DataModel;
-import org.apache.mahout.cf.taste.model.Preference;
 import org.apache.mahout.cf.taste.model.PreferenceArray;
 import org.apache.mahout.cf.taste.recommender.CandidateItemsStrategy;
 import org.apache.mahout.cf.taste.recommender.RecommendedItem;

Modified: mahout/trunk/core/src/test/java/org/apache/mahout/cf/taste/impl/similarity/GenericItemSimilarityTest.java
URL: http://svn.apache.org/viewvc/mahout/trunk/core/src/test/java/org/apache/mahout/cf/taste/impl/similarity/GenericItemSimilarityTest.java?rev=1089773&r1=1089772&r2=1089773&view=diff
==============================================================================
--- mahout/trunk/core/src/test/java/org/apache/mahout/cf/taste/impl/similarity/GenericItemSimilarityTest.java (original)
+++ mahout/trunk/core/src/test/java/org/apache/mahout/cf/taste/impl/similarity/GenericItemSimilarityTest.java Thu Apr  7 08:31:12 2011
@@ -64,12 +64,11 @@ public final class GenericItemSimilarity
   public void testAllSimilaritiesWithoutIndex() throws TasteException {
 
     List<GenericItemSimilarity.ItemItemSimilarity> itemItemSimilarities =
-        Arrays.asList(new GenericItemSimilarity.ItemItemSimilarity[]{
-        new GenericItemSimilarity.ItemItemSimilarity(1L, 2L, 0.2),
-        new GenericItemSimilarity.ItemItemSimilarity(1L, 3L, 0.2),
-        new GenericItemSimilarity.ItemItemSimilarity(2L, 1L, 0.2),
-        new GenericItemSimilarity.ItemItemSimilarity(3L, 5L, 0.2),
-        new GenericItemSimilarity.ItemItemSimilarity(3L, 4L, 0.2)});
+        Arrays.asList(new GenericItemSimilarity.ItemItemSimilarity(1L, 2L, 0.2),
+                      new GenericItemSimilarity.ItemItemSimilarity(1L, 3L, 0.2),
+                      new GenericItemSimilarity.ItemItemSimilarity(2L, 1L, 0.2),
+                      new GenericItemSimilarity.ItemItemSimilarity(3L, 5L, 0.2),
+                      new GenericItemSimilarity.ItemItemSimilarity(3L, 4L, 0.2));
 
     ItemSimilarity similarity = new GenericItemSimilarity(itemItemSimilarities);
 
@@ -84,12 +83,11 @@ public final class GenericItemSimilarity
   public void testAllSimilaritiesWithIndex() throws TasteException {
 
     List<GenericItemSimilarity.ItemItemSimilarity> itemItemSimilarities =
-        Arrays.asList(new GenericItemSimilarity.ItemItemSimilarity[]{
-        new GenericItemSimilarity.ItemItemSimilarity(1L, 2L, 0.2),
-        new GenericItemSimilarity.ItemItemSimilarity(1L, 3L, 0.2),
-        new GenericItemSimilarity.ItemItemSimilarity(2L, 1L, 0.2),
-        new GenericItemSimilarity.ItemItemSimilarity(3L, 5L, 0.2),
-        new GenericItemSimilarity.ItemItemSimilarity(3L, 4L, 0.2)});
+        Arrays.asList(new GenericItemSimilarity.ItemItemSimilarity(1L, 2L, 0.2),
+                      new GenericItemSimilarity.ItemItemSimilarity(1L, 3L, 0.2),
+                      new GenericItemSimilarity.ItemItemSimilarity(2L, 1L, 0.2),
+                      new GenericItemSimilarity.ItemItemSimilarity(3L, 5L, 0.2),
+                      new GenericItemSimilarity.ItemItemSimilarity(3L, 4L, 0.2));
 
     ItemSimilarity similarity = new GenericItemSimilarity(itemItemSimilarities);
 
@@ -100,7 +98,7 @@ public final class GenericItemSimilarity
     assertTrue(containsExactly(similarity.allSimilarItemIDs(5L), 3L));
   }
 
-  private boolean containsExactly(long[] allIDs, long... shouldContainID) {
+  private static boolean containsExactly(long[] allIDs, long... shouldContainID) {
     return new FastIDSet(allIDs).intersectionSize(new FastIDSet(shouldContainID)) == shouldContainID.length;
   }
 

Modified: mahout/trunk/core/src/test/java/org/apache/mahout/cf/taste/impl/similarity/jdbc/MySQLJDBCInMemoryItemSimilarityTest.java
URL: http://svn.apache.org/viewvc/mahout/trunk/core/src/test/java/org/apache/mahout/cf/taste/impl/similarity/jdbc/MySQLJDBCInMemoryItemSimilarityTest.java?rev=1089773&r1=1089772&r2=1089773&view=diff
==============================================================================
--- mahout/trunk/core/src/test/java/org/apache/mahout/cf/taste/impl/similarity/jdbc/MySQLJDBCInMemoryItemSimilarityTest.java (original)
+++ mahout/trunk/core/src/test/java/org/apache/mahout/cf/taste/impl/similarity/jdbc/MySQLJDBCInMemoryItemSimilarityTest.java Thu Apr  7 08:31:12 2011
@@ -49,19 +49,19 @@ public class MySQLJDBCInMemoryItemSimila
     EasyMock.expect(resultSet.isAfterLast()).andReturn(false);
     EasyMock.expect(resultSet.getLong(1)).andReturn(1L);
     EasyMock.expect(resultSet.getLong(2)).andReturn(2L);
-    EasyMock.expect(resultSet.getDouble(3)).andReturn(0.5d);
+    EasyMock.expect(resultSet.getDouble(3)).andReturn(0.5);
     EasyMock.expect(resultSet.next()).andReturn(true);
 
     EasyMock.expect(resultSet.isAfterLast()).andReturn(false);
     EasyMock.expect(resultSet.getLong(1)).andReturn(1L);
     EasyMock.expect(resultSet.getLong(2)).andReturn(3L);
-    EasyMock.expect(resultSet.getDouble(3)).andReturn(0.4d);
+    EasyMock.expect(resultSet.getDouble(3)).andReturn(0.4);
     EasyMock.expect(resultSet.next()).andReturn(true);
 
     EasyMock.expect(resultSet.isAfterLast()).andReturn(false);
     EasyMock.expect(resultSet.getLong(1)).andReturn(3L);
     EasyMock.expect(resultSet.getLong(2)).andReturn(4L);
-    EasyMock.expect(resultSet.getDouble(3)).andReturn(0.1d);
+    EasyMock.expect(resultSet.getDouble(3)).andReturn(0.1);
 
     EasyMock.expect(resultSet.isAfterLast()).andReturn(true);
 
@@ -75,9 +75,9 @@ public class MySQLJDBCInMemoryItemSimila
 
     ItemSimilarity similarity = new MySQLJDBCInMemoryItemSimilarity(dataSource);
 
-    assertEquals(similarity.itemSimilarity(1L, 2L), 0.5d, EPSILON);
-    assertEquals(similarity.itemSimilarity(1L, 3L), 0.4d, EPSILON);
-    assertEquals(similarity.itemSimilarity(3L, 4L), 0.1d, EPSILON);
+    assertEquals(0.5, similarity.itemSimilarity(1L, 2L), EPSILON);
+    assertEquals(0.4, similarity.itemSimilarity(1L, 3L), EPSILON);
+    assertEquals(0.1, similarity.itemSimilarity(3L, 4L), EPSILON);
     assertTrue(Double.isNaN(similarity.itemSimilarity(1L, 4L)));
 
     EasyMock.verify(dataSource, connection, statement, resultSet);

Modified: mahout/trunk/core/src/test/java/org/apache/mahout/classifier/naivebayes/NaiveBayesTestBase.java
URL: http://svn.apache.org/viewvc/mahout/trunk/core/src/test/java/org/apache/mahout/classifier/naivebayes/NaiveBayesTestBase.java?rev=1089773&r1=1089772&r2=1089773&view=diff
==============================================================================
--- mahout/trunk/core/src/test/java/org/apache/mahout/classifier/naivebayes/NaiveBayesTestBase.java (original)
+++ mahout/trunk/core/src/test/java/org/apache/mahout/classifier/naivebayes/NaiveBayesTestBase.java Thu Apr  7 08:31:12 2011
@@ -31,7 +31,7 @@ public class NaiveBayesTestBase extends 
                                                    Vector labelSum,
                                                    Vector featureSum) {
     double weight = 0.0;
-    double alpha = 1.0d;
+    double alpha = 1.0;
     for (int i = 0; i < featureSum.size(); i++) {
       double score = weightMatrix.get(i, label);
       double lSum = labelSum.get(label);
@@ -49,7 +49,7 @@ public class NaiveBayesTestBase extends 
                                       Vector labelSum,
                                       Vector featureSum) {
     double weight = 0.0;
-    double alpha = 1.0d;
+    double alpha = 1.0;
     for (int i = 0; i < featureSum.size(); i++) {
       double score = weightMatrix.get(i, label);
       double lSum = labelSum.get(label);

Modified: mahout/trunk/core/src/test/java/org/apache/mahout/clustering/kmeans/TestKmeansClustering.java
URL: http://svn.apache.org/viewvc/mahout/trunk/core/src/test/java/org/apache/mahout/clustering/kmeans/TestKmeansClustering.java?rev=1089773&r1=1089772&r2=1089773&view=diff
==============================================================================
--- mahout/trunk/core/src/test/java/org/apache/mahout/clustering/kmeans/TestKmeansClustering.java (original)
+++ mahout/trunk/core/src/test/java/org/apache/mahout/clustering/kmeans/TestKmeansClustering.java Thu Apr  7 08:31:12 2011
@@ -96,7 +96,8 @@ public final class TestKmeansClustering 
   }
 
   /**
-   * Tests {@link KMeansClusterer#runKMeansIteration) single run convergence with a given distance threshold.
+   * Tests {@link KMeansClusterer#runKMeansIteration(Iterable, Iterable, DistanceMeasure, double)} )
+   * single run convergence with a given distance threshold.
    */
   @Test
   public void testRunKMeansIterationConvergesInOneRunWithGivenDistanceThreshold() {

Modified: mahout/trunk/examples/src/main/java/org/apache/mahout/cf/taste/example/kddcup/track2/TrackItemSimilarity.java
URL: http://svn.apache.org/viewvc/mahout/trunk/examples/src/main/java/org/apache/mahout/cf/taste/example/kddcup/track2/TrackItemSimilarity.java?rev=1089773&r1=1089772&r2=1089773&view=diff
==============================================================================
--- mahout/trunk/examples/src/main/java/org/apache/mahout/cf/taste/example/kddcup/track2/TrackItemSimilarity.java (original)
+++ mahout/trunk/examples/src/main/java/org/apache/mahout/cf/taste/example/kddcup/track2/TrackItemSimilarity.java Thu Apr  7 08:31:12 2011
@@ -22,7 +22,6 @@ import java.io.IOException;
 import java.util.Collection;
 
 import org.apache.mahout.cf.taste.common.Refreshable;
-import org.apache.mahout.cf.taste.common.TasteException;
 import org.apache.mahout.cf.taste.example.kddcup.KDDCupDataModel;
 import org.apache.mahout.cf.taste.impl.common.FastByIDMap;
 import org.apache.mahout.cf.taste.impl.common.FastIDSet;
@@ -87,7 +86,7 @@ final class TrackItemSimilarity implemen
   }
 
   @Override
-  public long[] allSimilarItemIDs(long itemID) throws TasteException {
+  public long[] allSimilarItemIDs(long itemID) {
     FastIDSet allSimilarItemIDs = new FastIDSet();
     LongPrimitiveIterator allItemIDs = trackData.keySetIterator();
     while (allItemIDs.hasNext()) {

Modified: mahout/trunk/examples/src/main/java/org/apache/mahout/clustering/syntheticcontrol/dirichlet/Job.java
URL: http://svn.apache.org/viewvc/mahout/trunk/examples/src/main/java/org/apache/mahout/clustering/syntheticcontrol/dirichlet/Job.java?rev=1089773&r1=1089772&r2=1089773&view=diff
==============================================================================
--- mahout/trunk/examples/src/main/java/org/apache/mahout/clustering/syntheticcontrol/dirichlet/Job.java (original)
+++ mahout/trunk/examples/src/main/java/org/apache/mahout/clustering/syntheticcontrol/dirichlet/Job.java Thu Apr  7 08:31:12 2011
@@ -18,7 +18,6 @@
 package org.apache.mahout.clustering.syntheticcontrol.dirichlet;
 
 import java.io.IOException;
-import java.util.List;
 import java.util.Map;
 
 import org.apache.commons.cli2.builder.ArgumentBuilder;
@@ -26,9 +25,7 @@ import org.apache.commons.cli2.builder.D
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.fs.Path;
 import org.apache.hadoop.util.ToolRunner;
-import org.apache.mahout.clustering.Model;
 import org.apache.mahout.clustering.conversion.InputDriver;
-import org.apache.mahout.clustering.dirichlet.DirichletCluster;
 import org.apache.mahout.clustering.dirichlet.DirichletDriver;
 import org.apache.mahout.clustering.dirichlet.models.DistributionDescription;
 import org.apache.mahout.clustering.dirichlet.models.GaussianClusterDistribution;
@@ -37,7 +34,6 @@ import org.apache.mahout.common.Abstract
 import org.apache.mahout.common.HadoopUtil;
 import org.apache.mahout.common.commandline.DefaultOptionCreator;
 import org.apache.mahout.math.RandomAccessSparseVector;
-import org.apache.mahout.math.VectorWritable;
 import org.apache.mahout.utils.clustering.ClusterDumper;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -69,8 +65,7 @@ public final class Job extends AbstractJ
   }
 
   @Override
-  public int run(String[] args)
-    throws IOException, ClassNotFoundException, InstantiationException, IllegalAccessException, InterruptedException {
+  public int run(String[] args) throws IOException, ClassNotFoundException, InterruptedException {
     addInputOption();
     addOutputOption();
     addOption(DefaultOptionCreator.maxIterationsOption().create());
@@ -169,6 +164,7 @@ public final class Job extends AbstractJ
    * @param significant
    *          the minimum number of samples to enable printing a model
    */
+  /*
   private static void printClusters(Iterable<List<DirichletCluster>> clusters, int significant) {
     int row = 0;
     StringBuilder result = new StringBuilder(100);
@@ -186,4 +182,5 @@ public final class Job extends AbstractJ
     result.append('\n');
     log.info(result.toString());
   }
+   */
 }

Modified: mahout/trunk/math/src/main/java/org/apache/mahout/math/MatrixVectorView.java
URL: http://svn.apache.org/viewvc/mahout/trunk/math/src/main/java/org/apache/mahout/math/MatrixVectorView.java?rev=1089773&r1=1089772&r2=1089773&view=diff
==============================================================================
--- mahout/trunk/math/src/main/java/org/apache/mahout/math/MatrixVectorView.java (original)
+++ mahout/trunk/math/src/main/java/org/apache/mahout/math/MatrixVectorView.java Thu Apr  7 08:31:12 2011
@@ -72,7 +72,7 @@ public class MatrixVectorView extends Ab
 
   /**
    * Iterates over all elements <p/> * NOTE: Implementations may choose to reuse the Element returned
-   * for performance reasons, so if you need a copy of it, you should call {@link #getElement} for
+   * for performance reasons, so if you need a copy of it, you should call {@link #getElement(int)} for
    * the given index
    *
    * @return An {@link java.util.Iterator} over all elements
@@ -107,7 +107,7 @@ public class MatrixVectorView extends Ab
   /**
    * Iterates over all non-zero elements. <p/> NOTE: Implementations may choose to reuse the Element
    * returned for performance reasons, so if you need a copy of it, you should call {@link
-   * #getElement} for the given index
+   * #getElement(int)} for the given index
    *
    * @return An {@link java.util.Iterator} over all non-zero elements
    */

Modified: mahout/trunk/math/src/main/java/org/apache/mahout/math/Vector.java
URL: http://svn.apache.org/viewvc/mahout/trunk/math/src/main/java/org/apache/mahout/math/Vector.java?rev=1089773&r1=1089772&r2=1089773&view=diff
==============================================================================
--- mahout/trunk/math/src/main/java/org/apache/mahout/math/Vector.java (original)
+++ mahout/trunk/math/src/main/java/org/apache/mahout/math/Vector.java Thu Apr  7 08:31:12 2011
@@ -115,7 +115,7 @@ public interface Vector extends Cloneabl
 
   /**
    * Iterates over all elements <p/> * NOTE: Implementations may choose to reuse the Element returned for performance
-   * reasons, so if you need a copy of it, you should call {@link #getElement} for the given index
+   * reasons, so if you need a copy of it, you should call {@link #getElement(int)} for the given index
    *
    * @return An {@link Iterator} over all elements
    */
@@ -124,7 +124,7 @@ public interface Vector extends Cloneabl
 
   /**
    * Iterates over all non-zero elements. <p/> NOTE: Implementations may choose to reuse the Element returned for
-   * performance reasons, so if you need a copy of it, you should call {@link #getElement} for the given index
+   * performance reasons, so if you need a copy of it, you should call {@link #getElement(int)} for the given index
    *
    * @return An {@link Iterator} over all non-zero elements
    */

Modified: mahout/trunk/math/src/main/java/org/apache/mahout/math/VectorList.java
URL: http://svn.apache.org/viewvc/mahout/trunk/math/src/main/java/org/apache/mahout/math/VectorList.java?rev=1089773&r1=1089772&r2=1089773&view=diff
==============================================================================
--- mahout/trunk/math/src/main/java/org/apache/mahout/math/VectorList.java (original)
+++ mahout/trunk/math/src/main/java/org/apache/mahout/math/VectorList.java Thu Apr  7 08:31:12 2011
@@ -29,7 +29,7 @@ import java.util.List;
  */
 public class VectorList extends AbstractMatrix {
   private final int columns;
-  private List<Vector> data = Lists.newArrayList();
+  private final List<Vector> data = Lists.newArrayList();
 
   public VectorList(int columns) {
     this.columns = columns;

Modified: mahout/trunk/math/src/main/java/org/apache/mahout/math/decomposer/lanczos/LanczosSolver.java
URL: http://svn.apache.org/viewvc/mahout/trunk/math/src/main/java/org/apache/mahout/math/decomposer/lanczos/LanczosSolver.java?rev=1089773&r1=1089772&r2=1089773&view=diff
==============================================================================
--- mahout/trunk/math/src/main/java/org/apache/mahout/math/decomposer/lanczos/LanczosSolver.java (original)
+++ mahout/trunk/math/src/main/java/org/apache/mahout/math/decomposer/lanczos/LanczosSolver.java Thu Apr  7 08:31:12 2011
@@ -18,7 +18,12 @@
 package org.apache.mahout.math.decomposer.lanczos;
 
 
-import org.apache.mahout.math.*;
+import org.apache.mahout.math.DenseVector;
+import org.apache.mahout.math.Matrix;
+import org.apache.mahout.math.MatrixSlice;
+import org.apache.mahout.math.SparseRowMatrix;
+import org.apache.mahout.math.Vector;
+import org.apache.mahout.math.VectorIterable;
 import org.apache.mahout.math.function.DoubleFunction;
 import org.apache.mahout.math.function.Functions;
 import org.apache.mahout.math.function.PlusMult;

Modified: mahout/trunk/math/src/main/java/org/apache/mahout/math/matrix/DoubleMatrix1D.java
URL: http://svn.apache.org/viewvc/mahout/trunk/math/src/main/java/org/apache/mahout/math/matrix/DoubleMatrix1D.java?rev=1089773&r1=1089772&r2=1089773&view=diff
==============================================================================
--- mahout/trunk/math/src/main/java/org/apache/mahout/math/matrix/DoubleMatrix1D.java (original)
+++ mahout/trunk/math/src/main/java/org/apache/mahout/math/matrix/DoubleMatrix1D.java Thu Apr  7 08:31:12 2011
@@ -172,8 +172,8 @@ public abstract class DoubleMatrix1D ext
   }
 
   public Vector toVector() {
-    final DenseVector vector = new DenseVector(cardinality());
-    for(int i=0; i<cardinality(); i++) {
+    Vector vector = new DenseVector(cardinality());
+    for (int i = 0; i < cardinality(); i++) {
       vector.set(i, get(i));
     }
     return vector;
@@ -250,14 +250,14 @@ public abstract class DoubleMatrix1D ext
       }
     } else if (function instanceof PlusMult) {
       double multiplicator = ((PlusMult) function).getMultiplicator();
-      if (multiplicator == 0) { // x[i] = x[i] + 0*y[i]
+      if (multiplicator == 0.0) { // x[i] = x[i] + 0*y[i]
         // do nothing
-      } else if (multiplicator == 1) { // x[i] = x[i] + y[i]
+      } else if (multiplicator == 1.0) { // x[i] = x[i] + y[i]
         for (int index = nonZeroIndexes.size(); --index >= 0;) {
           int i = nonZeroElements[index];
           setQuick(i, getQuick(i) + y.getQuick(i));
         }
-      } else if (multiplicator == -1) { // x[i] = x[i] - y[i]
+      } else if (multiplicator == -1.0) { // x[i] = x[i] - y[i]
         for (int index = nonZeroIndexes.size(); --index >= 0;) {
           int i = nonZeroElements[index];
           setQuick(i, getQuick(i) - y.getQuick(i));

Modified: mahout/trunk/math/src/main/java/org/apache/mahout/math/matrix/impl/SparseDoubleMatrix1D.java
URL: http://svn.apache.org/viewvc/mahout/trunk/math/src/main/java/org/apache/mahout/math/matrix/impl/SparseDoubleMatrix1D.java?rev=1089773&r1=1089772&r2=1089773&view=diff
==============================================================================
--- mahout/trunk/math/src/main/java/org/apache/mahout/math/matrix/impl/SparseDoubleMatrix1D.java (original)
+++ mahout/trunk/math/src/main/java/org/apache/mahout/math/matrix/impl/SparseDoubleMatrix1D.java Thu Apr  7 08:31:12 2011
@@ -80,9 +80,11 @@ public final class SparseDoubleMatrix1D 
   }
 
 
+  @Override
   public Vector toVector() {
-    final RandomAccessSparseVector vector = new RandomAccessSparseVector(cardinality());
+    final Vector vector = new RandomAccessSparseVector(cardinality());
     elements.forEachPair(new IntDoubleProcedure() {
+      @Override
       public boolean apply(int i, double v) {
         vector.setQuick(i, v);
         return true;

Modified: mahout/trunk/math/src/main/java/org/apache/mahout/math/ssvd/EigenSolverWrapper.java
URL: http://svn.apache.org/viewvc/mahout/trunk/math/src/main/java/org/apache/mahout/math/ssvd/EigenSolverWrapper.java?rev=1089773&r1=1089772&r2=1089773&view=diff
==============================================================================
--- mahout/trunk/math/src/main/java/org/apache/mahout/math/ssvd/EigenSolverWrapper.java (original)
+++ mahout/trunk/math/src/main/java/org/apache/mahout/math/ssvd/EigenSolverWrapper.java Thu Apr  7 08:31:12 2011
@@ -40,7 +40,7 @@ import org.apache.commons.math.linear.Re
 public class EigenSolverWrapper {
 
   private final double[] eigenvalues;
-  private double[][] uHat;
+  private final double[][] uHat;
 
   public EigenSolverWrapper(double[][] bbt) {
     int dim = bbt.length;

Modified: mahout/trunk/math/src/test/java/org/apache/mahout/math/decomposer/SolverTest.java
URL: http://svn.apache.org/viewvc/mahout/trunk/math/src/test/java/org/apache/mahout/math/decomposer/SolverTest.java?rev=1089773&r1=1089772&r2=1089773&view=diff
==============================================================================
--- mahout/trunk/math/src/test/java/org/apache/mahout/math/decomposer/SolverTest.java (original)
+++ mahout/trunk/math/src/test/java/org/apache/mahout/math/decomposer/SolverTest.java Thu Apr  7 08:31:12 2011
@@ -17,7 +17,14 @@
 
 package org.apache.mahout.math.decomposer;
 
-import org.apache.mahout.math.*;
+import org.apache.mahout.math.DenseMatrix;
+import org.apache.mahout.math.DenseVector;
+import org.apache.mahout.math.MahoutTestCase;
+import org.apache.mahout.math.Matrix;
+import org.apache.mahout.math.SequentialAccessSparseVector;
+import org.apache.mahout.math.SparseRowMatrix;
+import org.apache.mahout.math.Vector;
+import org.apache.mahout.math.VectorIterable;
 import org.apache.mahout.math.function.Functions;
 
 import java.util.Random;
@@ -115,12 +122,14 @@ public abstract class SolverTest extends
       matrix.assignRow(row, v);
     }
     if(symmetric) {
-      if(true) return matrix.times(matrix.transpose());
-      for(int i = 0; i < numRows; i++) {
-        for(int j = 0; j < i; j++) {
-          matrix.set(j, i, matrix.get(i, j));
-        }
-      }
+      //if(true) {
+        return matrix.times(matrix.transpose());
+      //}
+      //for(int i = 0; i < numRows; i++) {
+      //  for(int j = 0; j < i; j++) {
+      //    matrix.set(j, i, matrix.get(i, j));
+      //  }
+      //}
     }
     return matrix;
   }

Modified: mahout/trunk/math/src/test/java/org/apache/mahout/math/decomposer/lanczos/TestLanczosSolver.java
URL: http://svn.apache.org/viewvc/mahout/trunk/math/src/test/java/org/apache/mahout/math/decomposer/lanczos/TestLanczosSolver.java?rev=1089773&r1=1089772&r2=1089773&view=diff
==============================================================================
--- mahout/trunk/math/src/test/java/org/apache/mahout/math/decomposer/lanczos/TestLanczosSolver.java (original)
+++ mahout/trunk/math/src/test/java/org/apache/mahout/math/decomposer/lanczos/TestLanczosSolver.java Thu Apr  7 08:31:12 2011
@@ -33,14 +33,13 @@ import java.util.List;
 public final class TestLanczosSolver extends SolverTest {
   private static final Logger log = LoggerFactory.getLogger(TestLanczosSolver.class);
 
-  private static final double ERROR_TOLERANCE = 1e-5;
+  private static final double ERROR_TOLERANCE = 1.0e-5;
 
   @Test
   public void testEigenvalueCheck() throws Exception {
     int size = 100;
     Matrix m = randomHierarchicalSymmetricMatrix(size);
     int desiredRank = 80;
-    float fractionOfEigensExpectedGood = 0.75f;
     LanczosSolver solver = new LanczosSolver();
     Matrix eigenvectors = new DenseMatrix(desiredRank, size);
     List<Double> eigenvalueList = new ArrayList<Double>();
@@ -49,6 +48,7 @@ public final class TestLanczosSolver ext
     EigenvalueDecomposition decomposition = new EigenvalueDecomposition(m);
     DoubleMatrix1D eigenvalues = decomposition.getRealEigenvalues();
 
+    float fractionOfEigensExpectedGood = 0.75f;
     for(int i = 0; i < fractionOfEigensExpectedGood * desiredRank; i++) {
       log.info(i + " : L = {}, E = {}",
           eigenvalueList.get(desiredRank - i - 1),

Modified: mahout/trunk/utils/src/test/java/org/apache/mahout/clustering/TestClusterDumper.java
URL: http://svn.apache.org/viewvc/mahout/trunk/utils/src/test/java/org/apache/mahout/clustering/TestClusterDumper.java?rev=1089773&r1=1089772&r2=1089773&view=diff
==============================================================================
--- mahout/trunk/utils/src/test/java/org/apache/mahout/clustering/TestClusterDumper.java (original)
+++ mahout/trunk/utils/src/test/java/org/apache/mahout/clustering/TestClusterDumper.java Thu Apr  7 08:31:12 2011
@@ -46,7 +46,6 @@ import org.apache.mahout.common.distance
 import org.apache.mahout.common.distance.ManhattanDistanceMeasure;
 import org.apache.mahout.common.iterator.sequencefile.SequenceFileValueIterable;
 import org.apache.mahout.math.DenseMatrix;
-import org.apache.mahout.math.DenseVector;
 import org.apache.mahout.math.Matrix;
 import org.apache.mahout.math.NamedVector;
 import org.apache.mahout.math.RandomAccessSparseVector;
@@ -380,7 +379,6 @@ public final class TestClusterDumper ext
     ClusterDumper clusterDumper =
         new ClusterDumper(finalClusterPath(conf, output, 10), new Path(output, "clusteredPoints"));
     clusterDumper.printClusters(termDictionary);
-    assertTrue(true);
   }
 
   @Test
@@ -420,6 +418,5 @@ public final class TestClusterDumper ext
     ClusterDumper clusterDumper =
         new ClusterDumper(finalClusterPath(conf, output, 10), new Path(output, "clusteredPoints"));
     clusterDumper.printClusters(termDictionary);
-    assertTrue(true);
   }
 }

Modified: mahout/trunk/utils/src/test/java/org/apache/mahout/clustering/cdbw/TestCDbwEvaluator.java
URL: http://svn.apache.org/viewvc/mahout/trunk/utils/src/test/java/org/apache/mahout/clustering/cdbw/TestCDbwEvaluator.java?rev=1089773&r1=1089772&r2=1089773&view=diff
==============================================================================
--- mahout/trunk/utils/src/test/java/org/apache/mahout/clustering/cdbw/TestCDbwEvaluator.java (original)
+++ mahout/trunk/utils/src/test/java/org/apache/mahout/clustering/cdbw/TestCDbwEvaluator.java Thu Apr  7 08:31:12 2011
@@ -29,7 +29,6 @@ import org.apache.hadoop.fs.FileSystem;
 import org.apache.hadoop.fs.Path;
 import org.apache.mahout.clustering.Cluster;
 import org.apache.mahout.clustering.ClusteringTestUtils;
-import org.apache.mahout.clustering.ModelDistribution;
 import org.apache.mahout.clustering.TestClusterEvaluator;
 import org.apache.mahout.clustering.canopy.Canopy;
 import org.apache.mahout.clustering.canopy.CanopyDriver;

Modified: mahout/trunk/utils/src/test/java/org/apache/mahout/text/SequenceFilesFromMailArchivesTest.java
URL: http://svn.apache.org/viewvc/mahout/trunk/utils/src/test/java/org/apache/mahout/text/SequenceFilesFromMailArchivesTest.java?rev=1089773&r1=1089772&r2=1089773&view=diff
==============================================================================
--- mahout/trunk/utils/src/test/java/org/apache/mahout/text/SequenceFilesFromMailArchivesTest.java (original)
+++ mahout/trunk/utils/src/test/java/org/apache/mahout/text/SequenceFilesFromMailArchivesTest.java Thu Apr  7 08:31:12 2011
@@ -18,7 +18,6 @@ package org.apache.mahout.text;
 
 import java.io.File;
 import java.io.FileOutputStream;
-import java.io.IOException;
 import java.util.zip.GZIPOutputStream;
 
 import org.apache.hadoop.conf.Configuration;
@@ -47,6 +46,7 @@ public final class SequenceFilesFromMail
    * Create the input and output directories needed for testing
    * the SequenceFilesFromMailArchives application.
    */
+  @Override
   @Before
   public void setUp() throws Exception {
     super.setUp();



Mime
View raw message