Boost logo

Boost :

From: Paul A Bristow (pbristow_at_[hidden])
Date: 2005-04-12 13:18:57


 

| -----Original Message-----
| From: boost-bounces_at_[hidden]
| [mailto:boost-bounces_at_[hidden]] On Behalf Of Darren Cook
| Sent: 12 April 2005 00:14
| To: boost_at_[hidden]
| Subject: Re: [boost] Regex-User: ISBN validation
|
| > but I DO have some C++ code to check both ISBN and Credit cards,
| > and most other protocols of this type.
| >
| > In fact I wonder if there is any interest in these as a
| Boost library?
|
| Yes (perhaps you could list all the protocols).

Credit card, ISBN, EAN,and UPC codes,
but can be quite general methods,
so you could devise similar error detection and correction
for arbitrary radix.
 
// Version of check used by Mastercard, VISA, and most other credit card
companies,
// to allow radix (or base) other than 10, for example 32, 36 and 64.
// Version using permutations devised by Joseph A. Gallian,
// University of Minnesota, Duluth, USA.
// Permutations Copyright Joseph A. Gallian 2002.
// Copyright Paul A Bristow, 2002.

// See Error Detection Methods, Joseph A. Gallian,
// ACM computing Surveys, 28(3) 504-517 (Sep 1996)
// ISSN 0360-0300

// J A Gallian & S Winters, (1988), Amer. Math. Monthly 95, 548-551.
// A. Ecker & G. Poch, Check Character system, Computing, 37, 277-301 (1986)

// The characters representing the digit values may be assigned arbitrarily
// using a lookup table, for example using code similar to
// Gene Callahan, Dr Dobb's Journal, Dec 1995, 131, 132 & 149.
// Generating Sequential keys in an Arbitrary Radix.
// For example, a radix 42 (Douglas Admas's Memorial) might use the
following
// "0123456789abcdefghijklmnopqrstuvwxyz!#$%&~"
// to represent integer values from 0,1,2 ... 40,41 where, for example,
// 0 is represented by '0', 9 by '9', 15 by 'f', ... 40 by '&' and 41 by '~'
// Some letters might be omitted to avoid confusion with digits ('0' and
'O')
// and to reduce the risk of offensive words appearing.

Of course, there is endless scope for argument about the presentation of
these functions.
(Templated versions for char, wide char, short int ...?)

So I am reluctant to embark on Boostification unless there is serious
interest.

I would have thought it would be useful for many applications,
but then Boost seems to be concentrating on more fundamental 'concepts'.

Paul

Paul A Bristow
Prizet Farmhouse, Kendal, Cumbria UK LA8 8AB
+44 1539 561830 +44 7714 330204
mailto: pbristow_at_[hidden]


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