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
Double is not really satisfying, as I can easily imagine integers, magnitudes with units or even more abstract magnitudes as weights. Of course you can say this can be mapped to real numbers, unfortunately doubles are not real numbers: just think of the problems with precision that doubles have.
Furthermore you just lose type information when doing this mapping.
So I'm not pleased with limiting weights to doubles at all :-(
Java seems not to have an abstraction of numbers or arithmetic values.
I first thought that the class Numbers would fill this role and designed a
WeightedEdge<V, W extends Number>
like thisbut this does not allow to formulate calculations with the weights, i.e. something like
So do we have to declare WeightedEdge to always use double for weights??
The text was updated successfully, but these errors were encountered: