Boost logo

Boost :

Subject: Re: [boost] different matrix library?
From: joel (joel.falcou_at_[hidden])
Date: 2009-08-15 02:28:18


Edward Grace wrote:
> Err - surely the point of overloading is to assign meaningful context
> specific behaviour to the same operator, so.
>
> unsigned a,b,c; c = a ^ b; // ^ => XOR makes sense.
>
> pseudovector<3> c;
> vector<3> a,b; c = a ^ b; // ^ => Wedge product makes sense XOR
> does not.
>
Well, except there is use case in computer vision or machien learning in
which you have large matrix of integer on which you apply bitwise
operation before feeding to some solver. ^ is clearly 'elementwise xor'
in this context.

so wedge_product is a better alternative.
> If, for example, b and c were pseudovectors then s would be a (true)
> scalar and could be assigned to the concrete type double. This is
> where carrying along some (meta) information concerning the
> transformation rules of these different entities would be both tricky
> and crucial.
In NT2 matrix of size(1,1) are castable to scalar and such operations
works flawlessly.

________________________________________
Joel Falcou - Assistant Professor
PARALL Team - LRI - Universite Paris Sud XI
Tel : (+33)1 69 15 66 35


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