Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started