Subject: Re: [boost] Formal review request: static size matrix/vector linear algebra library (Boost) LA
From: Agustín K-ballo Bergé (kaballo86_at_[hidden])
Date: 2010-02-08 19:37:57
El 05/02/2010 12:09 a.m., Emil Dotchevski escribió:
>> · I've often found the need to forward the result of some Boost.LA
>> operation. To do so, I'm using types from the detail namespace to
>> specify the return type. Until auto and decltype, and for C++03 support,
>> a result_of namespace ala Boost.Fusion would be nice.
> Good point. Can you elaborate on your needs to forward results from
> functions? Is it possible that the library is missing some important
> functions that you had to implement yourself?
Here is an example. I internally keep my vertices in arrays; in order to
return them as vertex conforming types to the outside I have to do the
boost::la::la_detail::vref_< T > get( int index )
return boost::la::vref( ... );
Ideally I would get ride of such `la_detail`, so I'm thinking something
boost::la::result_of::vref< T >::type get( int index );
>> · Support for subscript operator may be introduced via vref/mref. So
>> vref( any_conforming_vertex_type )[ I ] could be used for both direct
>> indexing and swizzling (as mentioned at your blog).
> Good idea. I wish this could be introduced non-intrusively though...
>> · Support for "complex swizzling expressions" would be nice. I've just
>> made that name up, but I'm referring to things like 'v1[Y,-X]' or
>> 'v1|(Y,-X)' (again, as mentioned at your blog).
> Great idea. I wonder what other expressions would make sense, besides minus.
In my current project I use the library to generically work with any
conforming vertex type, so I can't use the subscript operator since it
would be optional. That's why I propose adding support for subscript
operator via vref/mref. vref/mref would wrap the UDTs and implement the
subscript operators, similar to what they currently do for arrays.
>> Finally, I'm not keen on the library name, but I don't have a better one
>> to suggest.
> I'm not keen on the library name either. I'm open for suggestions.
If no better name is found, I'd rather have the library named
LinearAlgebra and the namespace `linear_algebra`. People can use
namespace aliases to have `la` back if they want to. However, this name
doesn't reflect either the statically sized nature of the elements it
Agustín K-ballo Bergé.-
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk