scalanlp/breeze — pull request #274 by gabeos (2014-07-09 01:44:05+00:00)
Title: Reshape UFunc + Matrix.flatten + some implicits

Okay, here's another semi-random PR. Big pieces are:

Matrix.flatten() ::
I thought I needed this, but ended up finding a way around it. I'm happy to take this out and just resubmit a PR for reshape and the implicits if that's preferable. But I added a flatten method to the Matrix class, and implementations for CSCMatrix and SliceMatrix. It unfortunately necessitated adding ClassTags in a bunch of places, but I'm not really sure why that would be a bad thing. Anyway, it's another piece of functionality that might be better implemented as a UFunc, so I could also re-factor it that way.

Reshape UFunc:
Implementation of column-major reshape for Dense/Sparse Matrices/Vectors. Works as expected in the tests that I ran.

Implicits:
CSCMatrix.CanCreateZerosLike
CSCMatrixOps.{OpMulScalar, OpMulMatrix}