You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
I might be doing something wrong, but seems to me that
NumericalProperty
is broken when retrieving numbers as double.The side effect here is that I cannot use
Graph.getNeighborsAtMaxDistance
because it is usinggetValueAsDouble
internally, so the comparison withmaxDistance
is always true.I tested with
1.10.8
which is described on the website as the latest release. I also found a version4.0.0
which useslong
instead ofint
, but the bug is there too.The text was updated successfully, but these errors were encountered: