Re: Creating BlockMatrix with java API

2015-09-23 Thread Sabarish Sasidharan
What I meant is that something like this would work. Yes, it's less than elegant but it works. List, Matrix>> blocks = new ArrayList,Matrix>>(); blocks.add( new Tuple2, Matrix>( new Tuple2(0, 0), Matrices.dense(2, 2, new double[] {0.0D, 1.1D, 2.0D, 3.1D}))); blocks.add( new Tuple2, Matrix>( new Tu

Re: Creating BlockMatrix with java API

2015-09-23 Thread Pulasthi Supun Wickramasinghe
Hi YiZhi, Actually i was not able to try it out to see if it was working. I sent the previous reply assuming that Sabarish's solution would work :). Sorry if there was any confusion. Best Regards, Pulasthi On Wed, Sep 23, 2015 at 6:47 AM, YiZhi Liu wrote: > Hi Pulasthi, > > Are you sure this w

Re: Creating BlockMatrix with java API

2015-09-22 Thread Pulasthi Supun Wickramasinghe
Hi Sabarish Thanks, that would indeed solve my problem Best Regards, Pulasthi On Wed, Sep 23, 2015 at 12:55 AM, Sabarish Sasidharan < sabarish.sasidha...@manthan.com> wrote: > Hi Pulasthi > > You can always use JavaRDD.rdd() to get the scala rdd. So in your case, > > new BlockMatrix(rdd.rdd(),

Re: Creating BlockMatrix with java API

2015-09-22 Thread Sabarish Sasidharan
Hi Pulasthi You can always use JavaRDD.rdd() to get the scala rdd. So in your case, new BlockMatrix(rdd.rdd(), 2, 2) should work. Regards Sab On Tue, Sep 22, 2015 at 10:50 PM, Pulasthi Supun Wickramasinghe < pulasthi...@gmail.com> wrote: > Hi Yanbo, > > Thanks for the reply. I thought i might

Re: Creating BlockMatrix with java API

2015-09-22 Thread Pulasthi Supun Wickramasinghe
Hi Yanbo, Thanks for the reply. I thought i might be missing something. Anyway i moved to using scala since it is the complete API. Best Regards, Pulasthi On Tue, Sep 22, 2015 at 7:03 AM, Yanbo Liang wrote: > This is due to the distributed matrices like > BlockMatrix/RowMatrix/IndexedRowMatri

Re: Creating BlockMatrix with java API

2015-09-22 Thread Yanbo Liang
This is due to the distributed matrices like BlockMatrix/RowMatrix/IndexedRowMatrix/CoordinateMatrix do not provide Java friendly constructors. I have file a SPARK-10757 to track this issue. 2015-09-18 3:36 GMT+08:00 Pulasthi Supun Wickramasinghe