Boost logo

Boost :

Subject: Re: [boost] [la] [static size matrix/vector linear algebra library] More feedback
From: Agustín K-ballo Bergé (kaballo86_at_[hidden])
Date: 2010-03-09 05:35:55


El 09/03/2010 06:53 a.m., Emil Dotchevski escribió:
> 2010/3/8 Agustín K-ballo Bergé <kaballo86_at_[hidden]>:
>> · boost/la/all.hpp conflicts with boost/assign/list_of.hpp if
>> Boost.Assign is included first. I think this has to do with missing
>> includes in a few headers.
>
> What do you mean missing includes? All (Boost) LA headers compile on
> their own (this is explicitly tested in the libs/la/test/Jamfile.)
>

Here is a small example that does not compile, however different from
what I initially report. it may be even illegal code?

#include <boost/la/col.hpp>
#include <boost/la/mat.hpp>
#include <boost/la/vec.hpp>

int main()
{
        using namespace boost::la;
        
        mat< float, 4, 4 > m = {};
        vec< float, 4 > v = {};
        ( m | col< 0 >() ) = v;
}

I don't have access to my source code right now, but as soon as I do I
will look for the real conflict between Boost.LA and Boost.Assign, which
I have fixed by just changing the inclusion order.

>> · Expressions like rotx_matrix() * roty_matrix() don't work. The
>> temporaries have to be stored in proper matrix variables first.
>> Apparently its result type does not model a valid matrix? (just guessing).
>
> Do you have code that demonstrates the problem? Which compiler? The
> following works for me:
> [snip]
>

I should have provided a full working example. Your code works. Mine
does not have `using namespace boost::la` which is what causes the
problem. Is not the first time I get bitten by this, but I'm waiting for
`namespace operators` to go `using`. Sorry for the noise.

>> · During RangeEx review, the use of views and algorithms was widely
>> discussed. It would be good for Boost.LA to follow the same conventions
>> decided back then.
>
> I'm not sure I understand your point, or maybe you need a different
> example. In (Boost) LA, m|transpose returns a transposed mutable
> reference to m.
>

I'm referring to points 4 and 5 here:
http://old.nabble.com/-Review-Results--Range.Ex-library-accepted-into-boost-p23253848.html

>> · I would like to have X, Y, Z and W placeholders be convertible to the
>> axis versor. However I don't think this can be actually implemented.
>> Maybe something like versor<float,3>( X ) or unit_vector<float,3>( X )
>> would be better.
>
> Could you provide an example of what you want exactly?
>

vec< float, 3 > const x_axis = unit_vector< float, 3 >( X );
// x_axis == { 1.f, 0.f, 0.f }

> Emil Dotchevski

Agustín K-ballo Bergé.-
http://talesofcpp.blogspot.com


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