Boost logo

Boost :

From: Andy Little (andy_at_[hidden])
Date: 2006-09-23 10:56:57

"Martin Slater" <mslater_at_[hidden]> wrote in message
> Olivier Grant wrote:
>> Well due to the fact that floats are represented on 4 bytes, there shouldn't
>> be any padding involved. Padding normally occures when certain member
>> variables of a structure require certain alignment constraints or just for
>> efficiency, but this shouldn't occur with a vector class (at least that is
>> my understanding).
> Why assume the type's will be floats ? There's a number of situations
> where doubles, fixed point or some lossless representation would be
> preferable, any solution that doesn't allow this isn't a serious vector
> library imo. Typedefs though should be provided for all the common cases
> (floats / doubles) for ease of use.

FWIW a boost::array is a valid fusion sequence, as OTOH is a tuple making

 a good choice as a basis for working with vectors and matrices of arbitrary
With a boost::array as the element type of a matrix it is relatively trivial to
access a fusion style matrix via the familiar

matrix[R][C] syntax.

Fusion also provides very powerful compile time ( and run time) facilities and
is well worth investigating for anyone contemplating a state of the art linear
algebra library.

Andy Little

Boost list run by bdawes at, gregod at, cpdaniel at, john at