Re: [glas] Skalar-Like concepts from GLAS and MTL
From: Toon Knapen (toon.knapen_at_[hidden])
Date: 2005-05-26 02:30:33
Here I am again. I have a bit further experimented in the direction of
Peter's proposal and it seems to work out nice. I've been concentrating
on the pure algebraic concepts (up until Group) for the moment. I've
uploaded the updated concepts here:
Let me comment on the main points of the changes:
1) Magma is not a refinement of Assignable (anymore). Instead probably
we need to add the requirement that the set is a refinment of Assigneable.
2) In the Magma I added the definition of the type of the 'operator'
saying that it is a BinaryFunctor.
3) inverse and identity are functors as well that depend on the type of
the Set as well as on the operation. Since the inverse and identity are
also dependent on the 'value_type', the inverse function is able to
return identity-matrices, scalars or whatever.
4) Note that identity is also a meta-function
5) I have made changes up to Group and also added two examples (which
can easily be compiled with boost-build) which show the use of
'identity' and 'inverse'.
I would like to change all higher-level concepts accordingly but first
I'm going to wait for some feedback to know if we're synced and going in
the right direction.
BTW, I mention Assigneable above but I'm also thinking about what we
should do with EqualityComparable. Would'nt it be good to introduce an
equality operation that takes a tolerance into account?