I might be doing something wrong, but seems to me that NumericalProperty is broken when retrieving numbers as double.
NumericalProperty p = new NumericalProperty("weight");
p.setValue(0, 10);
System.out.println(p.getValueAsDouble(0)); // 4.9E-323
System.out.println(p.getValueAsInt(0)); // 10
The side effect here is that I cannot use Graph.getNeighborsAtMaxDistance because it is using getValueAsDouble internally, so the comparison with maxDistance is always true.
I tested with 1.10.8 which is described on the website as the latest release. I also found a version 4.0.0 which uses long instead of int, but the bug is there too.
I might be doing something wrong, but seems to me that
NumericalPropertyis broken when retrieving numbers as double.The side effect here is that I cannot use
Graph.getNeighborsAtMaxDistancebecause it is usinggetValueAsDoubleinternally, so the comparison withmaxDistanceis always true.I tested with
1.10.8which is described on the website as the latest release. I also found a version4.0.0which useslonginstead ofint, but the bug is there too.