Boost logo

Boost :

From: Jason Kraftcheck (kraftche_at_[hidden])
Date: 2006-11-08 12:06:21


Jason Hise wrote:
> I did something very much like this a while back, which was submitted
> as a potential jumping off point for a boost geometry library. It is
> in the boost vault under Math - Geometry (http://tinyurl.com/ymjsoz),
> along with two other submissions. (Mine is geometryJH_01.zip).
>

I looked at your matrix implementation briefly, and have a few suggestions:
 o specialized implementations of inverse and determinant for common sizes
   (2x2, 3x3, maybe 4x4) will probably give better performance.
 o I got substantially better performance for matrix multiplies by
   explicitly unrolling the innermost loop. but I only tested on one
   platform, so that my not be a universal improvement.

I think that if Boost includes such a matrix implementation, it should be in
some general math primitives library, because it is applicable to more than just
geometry.

I think that my design of the matrix class is a little better because a vector
is defined as a Nx1 matrix, rather than the matrix being defined as an array of
vectors. This avoids the need for special operators for vector-matrix
multiplication, is closer to the underlying mathematical concept, and makes the
equivalency of a vector and column matrix explicit.


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