To generate IndexedRowMatrix from an RowMatrix

2014-11-10 Thread Lijun Wang
Hi, I need a matrix with each row having a index, e.g., index = 0 for first row, index = 1 for second row. Could someone tell me how to generate such IndexedRowMatrix from an RowMatrix? Besides, is there anyone having the experience to do multiplication of two distributed matrix, e.g., two

Re: To generate IndexedRowMatrix from an RowMatrix

2014-11-10 Thread Cheng Lian
You may use |RDD.zipWithIndex|. On 11/10/14 10:03 PM, Lijun Wang wrote: Hi, I need a matrix with each row having a index, e.g., index = 0 for first row, index = 1 for second row. Could someone tell me how to generate such IndexedRowMatrix from an RowMatrix? Besides, is there anyone

Re: To generate IndexedRowMatrix from an RowMatrix

2014-11-10 Thread buring
matrix multiply should not rely on assumption rowmatrix ordered. -- View this message in context: http://apache-spark-user-list.1001560.n3.nabble.com/To-generate-IndexedRowMatrix-from-an-RowMatrix-tp18490p18541.html Sent from the Apache Spark User List mailing list archive at Nabble.com