Learn>Implment>>Spread

Matrices Sum Map Reducer

Matrices Sum Map Reducer

Matrices Sum Map Reducer
Matrix sum is the operation of adding matrices by adding corresponding entries together.Entrywise sum
The sum of two m × n (pronounced “m by n”) matrices A and B, denoted by A + B, is again an m × n matrix computed by adding corresponding elements

Entrywise sum implementation using Map-reduce-

I have two matrices in separate files ( check blog indexingfor generating index), each file contains same size (m*n) matrix. matrix row index(m) and values separated by ^A [0x001] and values(n) are separated by (,).

Mapper emits the row index as key and entire row as a value. If you have different types of matrices then create separate mappers to process/ filters the matrix.