Skip to content

Instantly share code, notes, and snippets.

@dlwh
Created August 22, 2011 23:38
Show Gist options
  • Save dlwh/1163928 to your computer and use it in GitHub Desktop.
Save dlwh/1163928 to your computer and use it in GitHub Desktop.
sparsematrix sketch
class SparseMatrix[V:Scalar] extends mutable.Matrix[V] {
def numRows = 0
def numCols = 0
def update(i: Int, j: Int, value: V) {}
val scalar = implicitly[Scalar[V]]
def apply(i: Int, j: Int) = null
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment