2009/6/8 saupin guillaume <guillaume.saupin@gmail.com>


2009/6/5 Paul C. Leopardi <paul.leopardi@iinet.net.au>

On Thu, 4 Jun 2009, kayhman wrote:
> Concerning what I'm doing, I'd like to extend uBLAS with :
> - an object representing an element of the Lie group SE(3), using a vector
> of 7 doubles,
> - and another object representing an element of the Lie algebra associated
> se(3) using a vector of 6 doubles.
>
> For these objects, I need to redefine the inner and outer product as well
> as adding mapping operations log and exponential.
>
> Besides, I want to be able to use proxies for these two objects, as
> eventually I will maniupalte a cartesian product of Lie goup elements which
> will be stored in a global vector. Using proxies, I'd like to map each lie
> group element to the corresponding double sub array in the global vector.
>
> And finally, for performances, I want to benefit from the template
> expression mecanism to eliminates temporaries.

Hi kayhman,
I'm not sure if you really need inheritance here. Maybe you need to model "has
a" rather than "is a".
This may be the way to do it, but I think I'll lose the template expression mecanism if I do that, no ?


 


Besides vector addition and scalar multiplication, I'm not sure that your
objects share much in common with uBLAS vectors. For example, does it make
sense to multiply an element of SE(3) by a 7x7 matrix? Or multiply an element
of se(3) by a 6x6 matrix?

In GluCat ( http://glucat.sf.net ) for the matrix representation of Clifford
algebras, I used a multivector class containing a uBLAS matrix, rather than
inheritance, even though the Clifford operations of addition and
multiplication are essentially the same (actually there are algebra
injections involved: see "A generalized FFT for Clifford algebras", Bulletin
of the Belgian Mathematical Society - Simon Stevin, Volume 11, Number 5,
2005, pp. 663-688.  MR 2130632.
http://www.maths.unsw.edu.au/applied/files/2004/amr04_17.pdf ). I did this
because the matrix representation is with respect to an algebra, which in
Glucat is decribed by using an index set, so I needed the multivector class
to contain an index set as well as a matrix.

See also
http://www.objectmentor.com/resources/articles/lsp.pdf
http://www.berniecode.com/writing/inheritance/
Best, Paul
_______________________________________________
ublas mailing list
ublas@lists.boost.org
http://lists.boost.org/mailman/listinfo.cgi/ublas