Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ class DenseMatrix(

private[mllib] def apply(i: Int): Double = values(i)

def apply(i: Int, j: Int): Double = values(index(i, j))
override def apply(i: Int, j: Int): Double = values(index(i, j))

private[mllib] def index(i: Int, j: Int): Int = {
if (!isTransposed) i + numRows * j else j + numCols * i
Expand Down Expand Up @@ -398,7 +398,7 @@ class SparseMatrix(
}
}

def apply(i: Int, j: Int): Double = {
override def apply(i: Int, j: Int): Double = {
val ind = index(i, j)
if (ind < 0) 0.0 else values(ind)
}
Expand Down