[ML] Const correction, variable locality.
[ML] Replace throw with assert in DenseMatrix::op().
Merge pull request #548 from endJunction/DenseMatrixOptimizations

Dense matrix optimizations