@@ -217,7 +217,7 @@ class ALS extends Estimator[ALSModel] with ALSParams {
217217 }
218218}
219219
220- private [recommendation] object ALS extends Logging {
220+ object ALS extends Logging {
221221
222222 /** Rating class for better code readability. */
223223 private [recommendation]
@@ -337,8 +337,8 @@ private[recommendation] object ALS extends Logging {
337337 * Implementation of the ALS algorithm.
338338 */
339339 private def train [
340- @ specialized( Int , Long ) User : ClassTag ,
341- @ specialized( Int , Long ) Item : ClassTag ](
340+ User : ClassTag ,
341+ Item : ClassTag ](
342342 ratings : RDD [Rating [User , Item ]],
343343 rank : Int = 10 ,
344344 numUserBlocks : Int = 10 ,
@@ -470,7 +470,7 @@ private[recommendation] object ALS extends Logging {
470470 * @param rank rank
471471 * @return initialized factor blocks
472472 */
473- private def initialize [@ specialized( Int , Long ) Src ](
473+ private def initialize [Src ](
474474 inBlocks : RDD [(Int , InBlock [Src ])],
475475 rank : Int ): RDD [(Int , FactorBlock )] = {
476476 // Choose a unit vector uniformly at random from the unit sphere, but from the
@@ -494,7 +494,9 @@ private[recommendation] object ALS extends Logging {
494494 * A rating block that contains src IDs, dst IDs, and ratings, stored in primitive arrays.
495495 */
496496 private [recommendation]
497- case class RatingBlock [@ specialized(Int , Long ) Src , @ specialized(Int , Long ) Dst ](
497+ case class RatingBlock [
498+ @ specialized(Int , Long ) Src ,
499+ @ specialized(Int , Long ) Dst ](
498500 srcIds : Array [Src ],
499501 dstIds : Array [Dst ],
500502 ratings : Array [Float ]) {
@@ -550,8 +552,8 @@ private[recommendation] object ALS extends Logging {
550552 * @return an RDD of rating blocks in the form of ((srcBlockId, dstBlockId), ratingBlock)
551553 */
552554 private def partitionRatings [
553- @ specialized( Int , Long ) User : ClassTag ,
554- @ specialized( Int , Long ) Item : ClassTag ](
555+ User : ClassTag ,
556+ Item : ClassTag ](
555557 ratings : RDD [Rating [User , Item ]],
556558 srcPart : Partitioner ,
557559 dstPart : Partitioner ): RDD [((Int , Int ), RatingBlock [User , Item ])] = {
@@ -804,8 +806,8 @@ private[recommendation] object ALS extends Logging {
804806 * @return (in-blocks, out-blocks)
805807 */
806808 private def makeBlocks [
807- @ specialized( Int , Long ) Src : ClassTag ,
808- @ specialized( Int , Long ) Dst : ClassTag ](
809+ Src : ClassTag ,
810+ Dst : ClassTag ](
809811 prefix : String ,
810812 ratingBlocks : RDD [((Int , Int ), RatingBlock [Src , Dst ])],
811813 srcPart : Partitioner ,
@@ -887,7 +889,7 @@ private[recommendation] object ALS extends Logging {
887889 *
888890 * @return dst factors
889891 */
890- private def computeFactors [@ specialized( Int , Long ) Src ](
892+ private def computeFactors [Src ](
891893 srcFactorBlocks : RDD [(Int , FactorBlock )],
892894 srcOutBlocks : RDD [(Int , OutBlock )],
893895 dstInBlocks : RDD [(Int , InBlock [Src ])],
0 commit comments