Skip to content

Commit

Permalink
Fixing some last if else spacing issues
Browse files Browse the repository at this point in the history
  • Loading branch information
GeorgeDittmar committed Jun 9, 2015
1 parent ac53c55 commit aa330e3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -736,9 +736,9 @@ class SparseVector(
}

// look for inactive values in case all active node values are negative
if (size != values.size && maxValue <= 0){
if (size != values.size && maxValue <= 0) {
val firstInactiveIdx = calcFirstInactiveIdx(0)
if (!(maxValue == 0 && firstInactiveIdx >= maxIdx)){
if (!(maxValue == 0 && firstInactiveIdx >= maxIdx)) {
maxIdx = firstInactiveIdx
}
maxValue = 0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ class VectorsSuite extends FunSuite {
assert(vec.toArray.eq(arr))
}

test("dense argmax"){
test("dense argmax") {
val vec = Vectors.dense(Array.empty[Double]).asInstanceOf[DenseVector]
assert(vec.argmax === -1)

Expand All @@ -81,7 +81,7 @@ class VectorsSuite extends FunSuite {
assert(vec.toArray === arr)
}

test("sparse argmax"){
test("sparse argmax") {
val vec = Vectors.sparse(0,Array.empty[Int],Array.empty[Double]).asInstanceOf[SparseVector]
val noMax = vec.argmax
assert(noMax === -1)
Expand Down

0 comments on commit aa330e3

Please sign in to comment.