You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by db...@apache.org on 2015/10/31 01:12:23 UTC
spark git commit: [SPARK-11385] [ML] foreachActive made public in
MLLib's vector API
Repository: spark
Updated Branches:
refs/heads/master e8ec2a7b0 -> 69b9e4b3c
[SPARK-11385] [ML] foreachActive made public in MLLib's vector API
Made foreachActive public in MLLib's vector API
Author: Nakul Jindal <nj...@us.ibm.com>
Closes #9362 from nakul02/SPARK-11385_foreach_for_mllib_linalg_vector.
Project: http://git-wip-us.apache.org/repos/asf/spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/69b9e4b3
Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/69b9e4b3
Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/69b9e4b3
Branch: refs/heads/master
Commit: 69b9e4b3c2f929e3df55f5e71875c03bb9712948
Parents: e8ec2a7
Author: Nakul Jindal <nj...@us.ibm.com>
Authored: Fri Oct 30 17:12:24 2015 -0700
Committer: DB Tsai <db...@netflix.com>
Committed: Fri Oct 30 17:12:24 2015 -0700
----------------------------------------------------------------------
.../main/scala/org/apache/spark/mllib/linalg/Vectors.scala | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/spark/blob/69b9e4b3/mllib/src/main/scala/org/apache/spark/mllib/linalg/Vectors.scala
----------------------------------------------------------------------
diff --git a/mllib/src/main/scala/org/apache/spark/mllib/linalg/Vectors.scala b/mllib/src/main/scala/org/apache/spark/mllib/linalg/Vectors.scala
index dcdc614..bd9badc 100644
--- a/mllib/src/main/scala/org/apache/spark/mllib/linalg/Vectors.scala
+++ b/mllib/src/main/scala/org/apache/spark/mllib/linalg/Vectors.scala
@@ -123,7 +123,8 @@ sealed trait Vector extends Serializable {
* the vector with type `Int`, and the second parameter is the corresponding value
* with type `Double`.
*/
- private[spark] def foreachActive(f: (Int, Double) => Unit)
+ @Since("1.6.0")
+ def foreachActive(f: (Int, Double) => Unit): Unit
/**
* Number of active entries. An "active entry" is an element which is explicitly stored,
@@ -570,7 +571,8 @@ class DenseVector @Since("1.0.0") (
new DenseVector(values.clone())
}
- private[spark] override def foreachActive(f: (Int, Double) => Unit) = {
+ @Since("1.6.0")
+ override def foreachActive(f: (Int, Double) => Unit): Unit = {
var i = 0
val localValuesSize = values.length
val localValues = values
@@ -700,7 +702,8 @@ class SparseVector @Since("1.0.0") (
private[spark] override def toBreeze: BV[Double] = new BSV[Double](indices, values, size)
- private[spark] override def foreachActive(f: (Int, Double) => Unit) = {
+ @Since("1.6.0")
+ override def foreachActive(f: (Int, Double) => Unit): Unit = {
var i = 0
val localValuesSize = values.length
val localIndices = indices
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@spark.apache.org
For additional commands, e-mail: commits-help@spark.apache.org