April 2017
Intermediate to advanced
532 pages
12h 39m
English
In Scala, we will use the Breeze library to represent a matrix. A matrix can be represented as a dense or a CSC matrix.
val a = DenseMatrix((1,2),(3,4)) println("a : n" + a) val m = DenseMatrix.zeros[Int](5,5) The columns of a matrix can be accessed as Dense Vectors, and the rows as Dense Matrices. println( "m.rows :" + m.rows + " m.cols : " + m.cols) m(::,1) println("m : n" + m)
Read now
Unlock full access