Boost logo

Boost :

From: Manfred Doudar (manfred.doudar_at_[hidden])
Date: 2004-11-14 21:35:35


c/- All:

In taking a holistic look at some of the work I do, I've come
to realize a need for a "transparent" data type, and wondering
whether or not it exists.

As all of you would have experienced, any organization has such
a representation of such a type; be it called:

  "Null value", "Missing value", "Fill value", "Infinity" ,

or whatever.

What I am hoping for is support for such an representation,
with existing containers and algorithms; such that if you
perform any mathematical operation, (arithmetic, transcendental;
inverse; anything really ...); that you get back the *same*
object (ie. it passes transparently through any operation), and
not raise any exception if you so choose.

   Example:

         missing_val == atan(missing_val) - missing_val;
         missing_val == 1 / missing_val;
         missing_val == missing_val + missing_val;
         missing_val == missing_val - missing_val;

         typedef std::vector<any_type> dVec;
         dVec some_vector;

            ... populate some_vector ...

         dVec::iterator = some_vector.find(missing_val);

Boosters, do we have such a representation; is there value in having
such a thing in Boost; is there a (simple) alternative work-around ??

All ideas and comments appreciated.

Cheers,

-- 
Manfred
MetOcean Engineers

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