Boost logo

Boost :

From: helmut.zeisel_at_[hidden]
Date: 2001-10-10 09:14:54

--- In boost_at_y..., scleary_at_j... wrote:
> From: "Moore, Paul" <paul.moore_at_a...>

> > Secondly, all the talk I've seen of Euclidean rings
> > and the like, is worrying. Goal (1) "simplicity" means that
> > rational.hpp will stay
> > resolutely
> > targeted at integers - not rings, or any other mathematical
> > construct.

> I worry about it, too, even though I don't have as much math
> (I stopped
> after groups, argh!).
> I think that if someone wanted to go through the
> trouble to define a Ring concept, or ring_traits or whatever,
> and if they
> extended gcd/lcm to accept rings,
> I would have no problem with it (as long
> as it wasn't less efficient for integers).

Since you are speaking particulary about me,
I want to clarify my point of view once more again:

Makeing gcd more general can be done by just deleting
a few lines
(in particular, one must not change to absolute values
at the beginning of the algorithm).
The general code is simpler and (slighly) efficienter than the
specialized code.

> But for the initial release, I
> would just provide it for integers, and look at rings in the future.

I agree.
This is why I do not insist on the change to the general code.

> > OK, your GCD handles negative numbers - mine doesn't need to (as
> > rational
> > has always normalised to positive before calling it).
> Pool doesn't need to, either, since all values concerned are sizes
> of memory.

Exactly this "generalization" to negative numbers
makes the implementation less general.


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