Question: Hi , i am using scala for my project and i have no prior knowledge in it . . i want to - do block
Hi i am using scala for my project and i have no prior knowledge in it
i want todo block multiplication in scala
here is my code..
set the number of rows and columns per block to be
val rb
val cb
Convert large coordinate matrices to block matrices where each block has rows and columns
val MBlockMatrixLarge new CoordinateMatrixMRDDLarge.map case i j value MatrixEntryi j valuetoBlockMatrixrbcb
val NBlockMatrixLarge new CoordinateMatrixNRDDLarge.map case i j value MatrixEntryi j valuetoBlockMatrixcbcb
MBlockMatrixLarge.validate
NBlockMatrixLarge.validate
assertMBlockMatrixLarge.numRowBlocks "Result mismatch"
assertMBlockMatrixLarge.numColBlocks "Result mismatch"
assertNBlockMatrixLarge.numRowBlocks "Result mismatch"
assertNBlockMatrixLarge.numColBlocks "Result mismatch"
val RBlockLarge MBlockMatrixLarge.multiplyNBlockMatrixLarge
Notice the time it takes to multiply two x block matrices
RBlockLarge.blocks.count
I want a Faster Implementation of Matrix Multiplication than Block Matrix Multiplication.. can you pls help me with this? Thank you
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
