trying to convert a RowMatrix into BDM (Breeze Dense Matrix), not sure how to proceed need to implement
def getDenseMatrix(A: RowMatrix): BDM[Double] = {
//write code here
}
additional questions:
- how to convert a RowMatrix into a Matrix?
How to access a particular Row in the RowMatrix?
for(i <- 0 to (RowM.numCols().toInt-1)){ //How to access RowM.rows(i) }
How to access a particular column in the RowMatrix?
for(i <- 0 to (RowM.numCols().toInt-1)){ //How to access RowM.rows.map(f=>f(i)) }
- How to multiply 2 RowMatrices
note: RowMatrix has a API 'multiply' but it need the argument of type Matrix
say A and B are RowMatices, then AB = A.multiply(B), this will not work, as B
is a RowMatrix and not Matrix - And lastly how to convert a BDM to a RowMatrix?