27 Apr
2013
27 Apr
'13
9:40 p.m.
On Sun, Apr 28, 2013 at 4:20 AM, Erik Erlandson
For those who use STL distance is signed integer. If you choose unsigned integer, then I suggest reconsider function names to avoid potential confusion for users. For example, is it "deviation" that you name "distance"?
I thought the signed result type was "difference", not "distance."
Formally, any proper distance metric is always >= 0. String edit distance is such a metric, and I'd advocate both for continuing to call it edit_distance<>, and that it be an unsigned result.
I agree with both comments, STL distance does not represent a "metric". Regards, Vadim Stadnik