Re: [ojAlgo-user] question re: custom MatrixStore<>
Mathematics, linear algebra and optimisation
Brought to you by:
apete
From: Jonathan S. <jo...@ma...> - 2018-01-05 23:47:07
|
Rather than provide all of the context, quite simply if I create a class that implements MatrixStore<Double> the newly created class does not have the same set of operations that the AbstractMatrix class provides (such as invert()). Is MatrixStore<> the correct way to create an extensible matrix class? Secondly, is there a way to get the missing operators on the class through inheritance or something like that? On Fri, Jan 5, 2018 at 5:44 PM, Anders Peterson <an...@op...> wrote: > Not sure I understand what the problem is. Why can’t you just implement > everything you want in that matrix class of yours? > > /Anders > > > > On 5 Jan 2018, at 20:42, Jonathan Shore via ojAlgo-user < > oja...@li...> wrote: > > > > I have created a custom matrix store, that in addition to managing > access into the matrix as per the API supplies some additional > functionality I need. My intention is to use it as a 1st class matrix > class as a starting point in linear alg computations. > > > > However, I've noted that the MatrixStore<Double> interface implements > only a subset of the operations that, say, PrimitiveMatrix exposes. For > example I cannot directly call invert() on the matrix store, though I can > multiply and call a number of other operations directly. > > > > If I want to extend the matrix class API, I thought creating a new > MatrixStore would be the approach, but it seems that there is a more > complex hierarchy of MatrixStore, PhysicalStore, AbstractMatrix, etc which > I have not been able to figure out to integrate with. > > > > My Questions: > > > > • If I want to expose invert and other methods in my custom > matrix, what is the best approach to doing so? > > • If MatrixStore is not the best way to create custom Matrices, > what should the approach be. I recognize that MatrixStore most likely > refers to the storage / access functionality rather than matrix ops. I > would like to be able to bundle both > > Am stuck at this point. Any pointers greatly appreciated. > > > > --- > > Jonathan Shore > > > > ------------------------------------------------------------ > ------------------ > > Check out the vibrant tech community on one of the world's most > > engaging tech sites, Slashdot.org! http://sdm.link/slashdot______ > _________________________________________ > > ojAlgo-user mailing list > > ojA...@li... > > https://lists.sourceforge.net/lists/listinfo/ojalgo-user > > |