Skip to content

Commit 8d4ecbd

Browse files
committed
address comment and add mima excludes
1 parent da54179 commit 8d4ecbd

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

mllib/src/main/scala/org/apache/spark/mllib/linalg/Vectors.scala

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,8 @@ sealed trait Vector extends Serializable {
118118
private[spark] def foreachActive(f: (Int, Double) => Unit)
119119

120120
/**
121-
* Number of active entries. Inactive entries are all zeros, while active entries could be zero.
121+
* Number of active entries. An "active entry" is an element which is explicitly stored,
122+
* regardless of its value. Note that inactive entries have value 0.
122123
*/
123124
def numActives: Int
124125

project/MimaExcludes.scala

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,18 @@ object MimaExcludes {
7676
// SPARK-7090 Introduce LDAOptimizer to LDA to further improve extensibility
7777
ProblemFilters.exclude[MissingClassProblem](
7878
"org.apache.spark.mllib.clustering.LDA$EMOptimizer")
79+
) ++ Seq(
80+
// SPARK-6756 add toSparse, toDense, numActives, numNonzeros, and compressed to Vector
81+
ProblemFilters.exclude[MissingMethodProblem](
82+
"org.apache.spark.mllib.linalg.Vector.compressed"),
83+
ProblemFilters.exclude[MissingMethodProblem](
84+
"org.apache.spark.mllib.linalg.Vector.toDense"),
85+
ProblemFilters.exclude[MissingMethodProblem](
86+
"org.apache.spark.mllib.linalg.Vector.numNonzeros"),
87+
ProblemFilters.exclude[MissingMethodProblem](
88+
"org.apache.spark.mllib.linalg.Vector.toSparse"),
89+
ProblemFilters.exclude[MissingMethodProblem](
90+
"org.apache.spark.mllib.linalg.Vector.numActives")
7991
)
8092

8193
case v if v.startsWith("1.3") =>

0 commit comments

Comments
 (0)