Boost logo

Boost :

From: Kevin Lynch (krlynch_at_[hidden])
Date: 2008-04-29 12:35:18


Paul A Bristow wrote:
>
>> T next_greater(T val)
>>
>> Returns the next representable value greater than "val".
>>
>> T next_less(T val)
>>
>> Returns the next representable value less than "val".
>
> pred and succ have been used elsewhere. They are shorter.
>
>

I disagree with Paul here: I prefer the longer, more descriptive names,
especially in a general purpose library.

>> T edit_distance(T a, T b)
>
>> Returns the number of floating point representations between values a and b.
>

A useful function, with a technically accurate name. Works for me.

-- 
-------------------------------------------------------------------------------
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			http://budoe.bu.edu/~krlynch
-------------------------------------------------------------------------------

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk