Skip to content

Commit

Permalink
Use Double.PositiveInfinity instead of Double.Max
Browse files Browse the repository at this point in the history
  • Loading branch information
rezazadeh committed Aug 7, 2014
1 parent f56a882 commit eb1dc20
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Expand Up @@ -413,7 +413,7 @@ class RowMatrix(
*/
def similarColumns():
CoordinateMatrix = {
similarColumnsDIMSUM(Double.MaxValue)
similarColumns(Double.PositiveInfinity)
}

/**
Expand All @@ -425,7 +425,7 @@ class RowMatrix(
* and n is the number of columns
* @return An n x n sparse matrix of cosine similarities between columns of this matrix.
*/
def similarColumnsDIMSUM(gamma: Double):
def similarColumns(gamma: Double):
CoordinateMatrix = {
similarColumnsDIMSUM(columnMagnitudes(), gamma)
}
Expand Down
Expand Up @@ -107,7 +107,7 @@ class RowMatrixSuite extends FunSuite with LocalSparkContext {
}

for (mat <- Seq(denseMat, sparseMat)) {
val G = mat.similarColumnsDIMSUM(150.0)
val G = mat.similarColumns(150.0)
assert(closeToZero(G.toBreeze() - expected))
}

Expand Down

0 comments on commit eb1dc20

Please sign in to comment.