lessthanoptimal / ejml

A fast and easy to use linear algebra library written in Java for dense, sparse, real, and complex matrices.
https://ejml.org
565 stars 118 forks source link

Example using Semirings #82

Closed lessthanoptimal closed 4 years ago

lessthanoptimal commented 4 years ago

Simple example showing how to use Semirings. Preferably not something which is too abstract that you need to be an expert in the field to understand what's going on.

lessthanoptimal commented 4 years ago

Any ideas? @FlorentinD @breandan @szarnyasg @maxindelicato

maxindelicato commented 4 years ago

My primary use-case is their use in graph algorithms, of which the most well-known standard is GraphBLAS: http://graphblas.org/index.php?title=Graph_BLAS_Forum; also, see here for further actionable details: https://www.mit.edu/~kepner/GraphBLAS/GraphBLAS-Math-release.pdf. Perhaps some simple BFS examples could work? Or something along those lines?

FlorentinD commented 4 years ago

I agree bfs is a good example. I have some first bfs implementations on my fork in the mask branch (working but definitely not perfect) under BFS_DSCC. As the branch name indicates, these implementations also include masks. However they might be a good starting point.

Shortest path algorithm might also be a good choice to show different semirings

FlorentinD commented 4 years ago

And a really simple example is basically in my matrix vector test, which are one bfs iteration. E.g the elements in the vector represent the starting nodes and the matrix the adjacency matrix of a graph