Boost logo

Boost :

From: David Bergman (davidb_at_[hidden])
Date: 2002-09-09 20:45:35


About my suggestion for template instantiations to be categorized as
either

        (1) conceptual specialization; or
        (2) implementation specialization.

It seems to me that the interval library authors are considering their
template use as (2), while there are ideas of using "std::complex" as a
category (1) template with nested intervals(at least from Herve, I
think).

I suggest changing the library templates to category (1), which I think
would be a good first step to deal with the critique regarding the
library not being generic enough.

It is obviously easier to define an interval over a linear type, such as
double, than a non-linear one, such as "std::complex", so I understand
the pragmatic reasons for wanting "complex<interval<double>>", but do
not forget the goals for "std::complex", they define points in a complex
number plane...

/David

-----Original Message-----
From: boost-bounces_at_[hidden]
[mailto:boost-bounces_at_[hidden]] On Behalf Of Herve Bronnimann
Sent: Saturday, September 07, 2002 2:17 PM
To: boost_at_[hidden]
Subject: Re: [boost] Formal Review for Interval Library (was:
IntervalLibrary reminder)

On Sat, Sep 07, 2002 at 07:29:00PM +0200, Gabriel Dos Reis wrote:
> | Note that for intervals, it was a question at some point whether we
> | should provide specializations for T==float, double and long double,

> | with additional implicit conversions for float->double->long double.

> | For those ones, we can guarantee at least that there is no loss of
> | precision.
>
> This is what is done in the standard for std::complex<>, and in effect

> you end up rewritten the same thing over and over...

Yes that was also one worry. Although we tried to keep the class
template interval at its smallest, all of its members have to be
redefined for each specialization. And luckily, interval<T> does not
have as big an interface as complex<T>, but even then...

-- 
Herve'
_______________________________________________
Unsubscribe & other changes:
http://lists.boost.org/mailman/listinfo.cgi/boost

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