aboutsummaryrefslogtreecommitdiff
path: root/mllib/src/main
diff options
context:
space:
mode:
authorShivaram Venkataraman <shivaram@eecs.berkeley.edu>2013-08-08 14:36:02 -0700
committerShivaram Venkataraman <shivaram@eecs.berkeley.edu>2013-08-08 14:36:02 -0700
commite1a209f791a29225c7c75861aa4a18b14739fcc4 (patch)
treeeef0b527b2ae9e9a7a7d66ad4d4aa6df7f801971 /mllib/src/main
parent6caec3f44193a459a2dd10b0393e391979795039 (diff)
downloadspark-e1a209f791a29225c7c75861aa4a18b14739fcc4.tar.gz
spark-e1a209f791a29225c7c75861aa4a18b14739fcc4.tar.bz2
spark-e1a209f791a29225c7c75861aa4a18b14739fcc4.zip
Remove Java-specific constructor for Rating.
The scala constructor works for native type java types. Modify examples to match this.
Diffstat (limited to 'mllib/src/main')
-rw-r--r--mllib/src/main/scala/spark/mllib/recommendation/ALS.scala11
1 files changed, 1 insertions, 10 deletions
diff --git a/mllib/src/main/scala/spark/mllib/recommendation/ALS.scala b/mllib/src/main/scala/spark/mllib/recommendation/ALS.scala
index 7734c9279d..6c71dc1f32 100644
--- a/mllib/src/main/scala/spark/mllib/recommendation/ALS.scala
+++ b/mllib/src/main/scala/spark/mllib/recommendation/ALS.scala
@@ -17,9 +17,6 @@
package spark.mllib.recommendation
-import java.lang.{Integer => JInt}
-import java.lang.{Double => JDouble}
-
import scala.collection.mutable.{ArrayBuffer, BitSet}
import scala.util.Random
import scala.util.Sorting
@@ -58,13 +55,7 @@ private[recommendation] case class InLinkBlock(
/**
* A more compact class to represent a rating than Tuple3[Int, Int, Double].
*/
-case class Rating(val user: Int, val product: Int, val rating: Double) {
-
- // Constructor to build a rating from java Integers and Doubles.
- def this(user: JInt, product: JInt, rating: JDouble) = {
- this(user.intValue(), product.intValue(), rating.doubleValue())
- }
-}
+case class Rating(val user: Int, val product: Int, val rating: Double)
/**
* Alternating Least Squares matrix factorization.