You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@flink.apache.org by Ekram Ali <ek...@impetus.co.in> on 2017/02/07 17:30:50 UTC

SparseMatrix Multilpication

I could not find SparseMatrix Multilpication or addition function in flink
,please suggest how will perform multiplication and addition.

ex -[1 ,2 ,4],[2,5,7]

and i want to multiply by 5 in whole matrix so that every element multiply
by 5.
same in case of addition
please suggest.



--
View this message in context: http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/SparseMatrix-Multilpication-tp11499.html
Sent from the Apache Flink User Mailing List archive. mailing list archive at Nabble.com.

Re: SparseMatrix Multilpication

Posted by Felix Neutatz <ne...@googlemail.com>.
Hi Ekram,

if you are refering to
https://github.com/apache/flink/blob/d7b59d761601baba6765bb4fc407bcd9fd6a9387/flink-libraries/flink-ml/src/main/scala/org/apache/flink/ml/math/SparseMatrix.scala

You could first convert it to a Breeze Matrix:
https://github.com/apache/flink/blob/1753b1d25b4d943c1ffbe7c3fb40e56b840c4f7d/flink-libraries/flink-ml/src/main/scala/org/apache/flink/ml/math/Breeze.scala#L31
and then multiply. If you are talking about a distributed matrix
vectorization, you need to implement it on your own.
Same applies to your question about Dense Matrices.

Best regards,
Felix

On Feb 7, 2017 18:34, "Ekram Ali" <ek...@impetus.co.in> wrote:

I could not find SparseMatrix Multilpication or addition function in flink
,please suggest how will perform multiplication and addition.

ex -[1 ,2 ,4],[2,5,7]

and i want to multiply by 5 in whole matrix so that every element multiply
by 5.
same in case of addition
please suggest.



--
View this message in context: http://apache-flink-user-maili
ng-list-archive.2336050.n4.nabble.com/SparseMatrix-Multil
pication-tp11499.html
Sent from the Apache Flink User Mailing List archive. mailing list archive
at Nabble.com.