Mar 6, 2013 Replies: 18 This is a wrapper for the efficient-java-matrix-library library. Specifically the SimpleMatrix class intended for linera algebra computations. The included "demo" is utterly trivial but then if you know how to do linear algebra you shouldn't need whatever feeble atttempt at a demo that I could come up with to understand how to use this library. EDIT:- Version 1.1 posted. See post #4 for details. EDIT:- Version 1.2 posted. See post #7 for details. EDIT:- Version 1.3 posted. See post #9 for details. EDIT:- Version 1.4 posted. See post #12 for details. Attachments EJML1.4.zip EJML1.4.zip 218.3 KB · Views: 1,092 Last edited: Apr 12, 2013 Click to expand...
This is a wrapper for the efficient-java-matrix-library library. Specifically the SimpleMatrix class intended for linera algebra computations. The included "demo" is utterly trivial but then if you know how to do linear algebra you shouldn't need whatever feeble atttempt at a demo that I could come up with to understand how to use this library. EDIT:- Version 1.1 posted. See post #4 for details. EDIT:- Version 1.2 posted. See post #7 for details. EDIT:- Version 1.3 posted. See post #9 for details. EDIT:- Version 1.4 posted. See post #12 for details.
agraham Expert Licensed User Longtime User Mar 6, 2013 #4 Super-rapid update to version 1.1. Despite (as I thought) double checking I still managed to miss exposing a few important methods. Decompositions still to follow sometime soon.
Super-rapid update to version 1.1. Despite (as I thought) double checking I still managed to miss exposing a few important methods. Decompositions still to follow sometime soon.
rbghongade Well-Known Member Licensed User Longtime User Mar 8, 2013 #6 Dear agraham, Thank you so very much! I have tested your library and it is simply wonderful, very intuitive for usage. warm regards, rajesh Last edited: Mar 8, 2013
Dear agraham, Thank you so very much! I have tested your library and it is simply wonderful, very intuitive for usage. warm regards, rajesh
agraham Expert Licensed User Longtime User Mar 14, 2013 #7 Version 1.2 now posted includes matrix decompositions, specifically Eigendecomposition and Singular Value decomposition by providing two extra objects SimpleEVD and SimpleSVD. The authors of EJML say These decompositions should meet most people needs. Direct access to other decompositions (e.g. QR and Cholesky) is not provided in SimpleMatrix because solve() and inv() is provided instead Click to expand... I think that the exposure of the SimpleXXX functionality of EJML is complete. Other decompositions are available in the original ejml.jar library and could probably be exposed if required.
Version 1.2 now posted includes matrix decompositions, specifically Eigendecomposition and Singular Value decomposition by providing two extra objects SimpleEVD and SimpleSVD. The authors of EJML say These decompositions should meet most people needs. Direct access to other decompositions (e.g. QR and Cholesky) is not provided in SimpleMatrix because solve() and inv() is provided instead Click to expand... I think that the exposure of the SimpleXXX functionality of EJML is complete. Other decompositions are available in the original ejml.jar library and could probably be exposed if required.
kiki78 Active Member Licensed User Longtime User Mar 22, 2013 #8 Get & Set Thank you very much agraham for this useful wrapper. May you add in future release, wrapper for unique index version of set and get ? You can, for example, name it as "SetElement1Id" and "GetElement1Id". It's interesting when we use it as Vector. Best Regards Last edited: Mar 22, 2013
Get & Set Thank you very much agraham for this useful wrapper. May you add in future release, wrapper for unique index version of set and get ? You can, for example, name it as "SetElement1Id" and "GetElement1Id". It's interesting when we use it as Vector. Best Regards
agraham Expert Licensed User Longtime User Mar 29, 2013 #9 Version 1.3 now posted implements GetElement1D, GetIndex and SetElement1D. I chose "1D" as in "one dimension" as the GetElement(row, col) is a 2D operation.
Version 1.3 now posted implements GetElement1D, GetIndex and SetElement1D. I chose "1D" as in "one dimension" as the GetElement(row, col) is a 2D operation.
kiki78 Active Member Licensed User Longtime User Apr 12, 2013 #10 Thank you agraham :sign0098: Sorry for late thanks, but I work on other project and lack update. Regards
Thank you agraham :sign0098: Sorry for late thanks, but I work on other project and lack update. Regards
kiki78 Active Member Licensed User Longtime User Apr 12, 2013 #11 If it's not too much, may you also give access to inherited underlying double array "data". :sign0060: This permit to go back to double array after some calculation. "data" is one dimension array, that is good for quicker access than 2 dimensions. As Basic4Android doesn't give embedded size property of each dimensions for multi-dimension array, I think it's also good idea to live it in one dimension. Thank you by advance agraham.
If it's not too much, may you also give access to inherited underlying double array "data". :sign0060: This permit to go back to double array after some calculation. "data" is one dimension array, that is good for quicker access than 2 dimensions. As Basic4Android doesn't give embedded size property of each dimensions for multi-dimension array, I think it's also good idea to live it in one dimension. Thank you by advance agraham.
agraham Expert Licensed User Longtime User Apr 12, 2013 #12 Version 1.4 now posted implements a "Data" property to get or set a reference to the underlying single dimension Double array that holds the matrix data.
Version 1.4 now posted implements a "Data" property to get or set a reference to the underlying single dimension Double array that holds the matrix data.
kiki78 Active Member Licensed User Longtime User Apr 12, 2013 #13 Thank you agraham for this very quick update. Kind Regards
kiki78 Active Member Licensed User Longtime User Aug 2, 2013 #14 Hi agraham, May you implements following methods ? - elementMax - elementMin Thank you by advance agraham.
Hi agraham, May you implements following methods ? - elementMax - elementMin Thank you by advance agraham.
agraham Expert Licensed User Longtime User Aug 2, 2013 #15 It looks like it would be just as efficient for you to write your own methods to iterate over the double array returned by the Data property as that is what EJML does. Code: public static double elementMax(D1Matrix64F paramD1Matrix64F) { int i = paramD1Matrix64F.getNumElements(); double d1 = paramD1Matrix64F.get(0); for (int j = 1; j < i; j++) { double d2 = paramD1Matrix64F.get(j); if (d2 >= d1) d1 = d2; } return d1; }
It looks like it would be just as efficient for you to write your own methods to iterate over the double array returned by the Data property as that is what EJML does. Code: public static double elementMax(D1Matrix64F paramD1Matrix64F) { int i = paramD1Matrix64F.getNumElements(); double d1 = paramD1Matrix64F.get(0); for (int j = 1; j < i; j++) { double d2 = paramD1Matrix64F.get(j); if (d2 >= d1) d1 = d2; } return d1; }
ilan Expert Licensed User Longtime User Sep 26, 2013 #17 hi agraham i am searching for a solution to handle a database without a control that i have to add to my app until now i used tableview but i need to add it, now i found your lib its great but i cannot add STRING as value only double i understand that its not made for my uses but it could be perfect to use it as a tableview (with strings) its also saving to csv files exactly what i need do u have a idee how i could use your lib and instead of doubles as value use string? thank you
hi agraham i am searching for a solution to handle a database without a control that i have to add to my app until now i used tableview but i need to add it, now i found your lib its great but i cannot add STRING as value only double i understand that its not made for my uses but it could be perfect to use it as a tableview (with strings) its also saving to csv files exactly what i need do u have a idee how i could use your lib and instead of doubles as value use string? thank you
rbghongade Well-Known Member Licensed User Longtime User Nov 25, 2013 #18 Dear agraham, I am in the process of writing a function for computing roots of a polynomial using eigen value decomposition, hence I require to have complex roots. Is it possible to modify your library to return complex roots as well? Above documentation says that it returns only real eigen values. The link given below describes the java code for computing roots of polynomial using EJML. https://code.google.com/p/efficient-java-matrix-library/wiki/PolynomialRootExample Since I do not know java language ,I am stuck there. regards,
Dear agraham, I am in the process of writing a function for computing roots of a polynomial using eigen value decomposition, hence I require to have complex roots. Is it possible to modify your library to return complex roots as well? Above documentation says that it returns only real eigen values. The link given below describes the java code for computing roots of polynomial using EJML. https://code.google.com/p/efficient-java-matrix-library/wiki/PolynomialRootExample Since I do not know java language ,I am stuck there. regards,
agraham Expert Licensed User Longtime User Nov 25, 2013 #19 I'm sorry but I kept the implementation to that of exposing SimpleMatrix because that is about as much as my tiny brain can cope with.
I'm sorry but I kept the implementation to that of exposing SimpleMatrix because that is about as much as my tiny brain can cope with.