neo4j-contrib / neo4j-graph-algorithms

Efficient Graph Algorithms for Neo4j
https://github.com/neo4j/graph-data-science/
GNU General Public License v3.0
771 stars 194 forks source link

IEEE 754 AtomicDoubleArray #455

Open mknblch opened 6 years ago

mknblch commented 6 years ago

Our implementation of the AtmicDoubleArray is rather crude and i think noone cares about the scaleFactor. And in reality its impossible to calculate a good value since this depends on the algorithm, the node count, weights etc. It seems we often run into issues with our centrality-algos because of that. Anyway.. im thinking of changing the format to IEEE 754 by using javas builtin methods Double.toLongBits(..) etc. Then we can get rid of the optional configuration parameter scaleFactor. If we also implement a Float based 32bit version the user can add a config param for high or low precision. The Float Version just has to cast to double.

mknblch commented 6 years ago

457 changed the representation to IEEE 754 but i did not add the flaot version and presicion handling yet.