-
Notifications
You must be signed in to change notification settings - Fork 119
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for IMatrix* and Graph Theory Operations #68
Comments
The support is fairly minimal, mostly as a way to mask elements in a matrix. However is there much overlap between linear algebra and the techniques you mentioned? |
There are a number of interesting connections between linear algebra and graph theory, e.g. you can take eigenvalues of graph laplacians or invert the adjacency matrix. For a short survey of some applications, see Johnson or maybe Spielman if you're looking for something more comprehensive. edit: You could probably use |
You might also check out the GraphBLAS library and the Graph Algorithms in the Language of Linear Algebra book. There is a lot of interest in sparse matrix representations for graphs, it would be great to have a native linear algebra library with support for boolean and integer matrices on the JVM. |
Do you @szarnyasg ? He's also interested in linear algebra and graphs. I'm not opposed to adding an integer matrix type, but all the algorithms to make it useful. Right now I just don't have a personal need. |
Hi,
I agree but its a big undertaking. Adding an integer matrix type sounds fairly simple but then you also need to support add various for semirings and, if you want to apply the tool to solve big graph problems, it needs to run in parallel as well. Tim Davis gave a great talk yesterday at the SIAM Minisymposium on Linear Algebraic Tools for Graph Computation, going into detail about how he parallelizes matrix multiplication algorithms. It is fairly obvious that these techniques (many of them because you different ones to cover the various setups regarding graph size, degree distribution, available threads and memory, etc.) take years to implement. Gabor |
Are you aware of any JVM bindings for GraphBLAS? Maybe it would be possible to benefit from Tim’s work without reimplementing the wheel here. Is it worth starting a new project? Seems like there are already a bunch of graph libraries which could potentially benefit from sparse matrix representations. |
@breandan yes, there's someone working on this, see: https://github.com/fabianmurariu/graphblas-java-native |
In case you do end up adding this feature, I've found that using |
@breandan |
Does adding an |
I still think it would be productive for correctness and efficiency to have proper |
JEP 218 may or may not be usable right away. Basically EJML is used on a lot of different versions of Java and needs to maintain Android and Kotlin compatibility. As a result the generated byte code must be 1.8 compatible. Thanks to some hacks Java 14 syntax can be used but none of the new API's since 8 can be used. If JEP 218 is just syntax sugar like switch expressions then it could be used right away. |
I see the main problem in having operators which support combination of different typed matrices, e.g. I won't be able to look into this while I am working on my thesis. |
If we just said screw it to efficiency and got something that worked using the most generic code possible would it be easy then to get some functionality? Having something that works even if it's slow is better than nothing. |
Regarding functionality I think using doubles is sufficient for now. What do you think @breandan @lessthanoptimal ? |
I was also thinking of using lambdas or anything else very generic. I've not looked close enough into these problems to know if that would help. Somewhat related, I've added more support for lambdas in dense operations. |
I see that ejml has support for logical matrices. Would you be open to including integer matrices, or is this currently out of scope? These have a number of applications in graph theory and discrete math.
The text was updated successfully, but these errors were encountered: