Boost logo

Boost :

From: Kevin Lynch (krlynch_at_[hidden])
Date: 2008-04-30 10:05:28

Paul A Bristow wrote:
> I also find the name edit_distance very unintuitive. In fact I struggle to see from how the definition in Wikipedia it is
> 'technically accurate'.
> "In information theory and computer science, the edit distance between two strings of characters is the number of operations
> required to transform one of them into the other. There are several different algorithms to define or calculate this metric".

I'm the one that called it "technically accurate" yesterday, and I still
think it is (although it may not be intuitive, and reasonable people can
disagree, I guess :-) ).

The only "primitive operations" allowed on floating point numbers are
the arithmetic operations ... you aren't allowed "positional operations"
or "string indexing" operations the way you are for integers or strings.
So if the question is "How many fundamental, single bit additions does
it take to get from a to b" ... that sounds to me like an "edit
distance" (perhaps we should call it the Maddock Floating Point Edit
Distance for clarity :-)

I certainly like edit_distance better than most of the other names I've
seen; "float_distance" in particular seems like a poor choice to me ...
I think its semantics will be too easily confused with std::distance ...
but then, what do I know :-) But I don't really care all that much

Kevin Lynch				voice:	(617) 353-6025
Physics Department			Fax: (617) 353-9393
Boston University			office:	 PRB-361
590 Commonwealth Ave.			e-mail:	 krlynch_at_[hidden]
Boston, MA 02215 USA

Boost list run by bdawes at, gregod at, cpdaniel at, john at