Boost logo

Glas :

Re: [glas] pure algebraic concepts cfr additive

From: Karl Meerbergen (Karl.Meerbergen_at_[hidden])
Date: 2005-05-27 01:34:48


I am happy with Toon and Peter's contributions. It allows for some
freedom in the creation of operators that lead to a group, e.g. element
wise products of vectors and matrices (which can be implemented with a
functor element_prod() or something of this kind).

Peter, have you had any chance to look at the richardson iteration example?

Have a nice day,


Peter Gottschling wrote:

> On May 26, 2005, at 3:22 PM, Toon Knapen wrote:
>> I'm currently wondering if it's a good idea to consider AdditiveMagma
>> to be a refinement of the Magma concept. This might sound strange but
>> let me explain.
>> For the pure algebraic concepts, we always talk about a set S and
>> some operation-type which is conform to a BinaryFunctor.
>> In the case of an AdditiveMagma, we don't need a seperate
>> BinaryFunctor but instead we have an 'operator+(const T&)'. The
>> operator+ is defined on the elements of the set.
> Of course, this looks strange in the first place that a single-type
> concept refines a multi-type concept. By definition a refinement is an
> addition of requirements, which implies that every type T that model
> concept C2 necessarily models C1 if C2 is a refinement of C1. To have
> this property between AdditiveMagma and Magma we need an extra tool,
> the default functor. As I defined the concepts and the default
> functors, every type that models AdditiveMagma is always a model of
> Magma using the default functor.
> We can discuss if this is really a refinement in the pure sense of the
> definition. We could may be call it semi-refinement or weak refinement
> for distinction because it uses a tool. The important point is that it
> works for implementations, i.e. every type that model some additive
> concept can _always_ call a template function requiring the
> corresponding pure algebraic function. And this is from my prospective
> more important than whether we call it refinement or semi-refinement.
> BTW, we shall also check whether we can implement this (semi-)
> refinement with the type traits for identity and inverse.
>> Additionally, it is also possible to take a model of an AdditiveMagma
>> and an operator that together are a model of a Magma. It might sound
>> weird but I think this is kind of powerfull.
> This was my intension to show that addition and multiplication are
> only two instances of operation. Surely, the most important by far but
> not the only ones.
> Peter
> ------------
> Peter Gottschling
> Research Associate
> Open Systems Laboratory
> Indiana University
> 301i Lindley Hall
> Bloomington, IN 47405
> Tel.: +1 812 855-8898 Fax: +1 812 856 0853
> _______________________________________________
> glas mailing list
> glas_at_[hidden]

Look at our unique training program and
Register on-line at
Karl Meerbergen
Free Field Technologies
16 place de l'Université
B-1348 Louvain-la-Neuve - BELGIUM
Company Phone:  +32 10 45 12 26
Company Fax:    +32 10 45 46 26
Mobile Phone:   +32 474 26 66 59
Home Phone:     +32 2 306 38 10