Boost logo

Boost :

From: Andreas Harnack (ah.boost.04_at_[hidden])
Date: 2007-12-06 17:07:33

Jens Seidel schrieb:
> Hi,
> a few days ago I started exactly as you described (except that I used
> old style for loops instead of STL stuff :-) a TinyDenseMatrix class
> to implement the Moore Penrose pseudo inverse for real tiny matrices
> (4 x n, n<20).
> A very big disadvantage is using fixed dimensions. There is no need for
> memory allocation in this case but it restricts the usage dramatically!
> Nearly always the dimensions are variables, there are only a few rare
> cases where you know these before. So how about making N and M variables
> and providing one or two good memory allocators?
>> T* data() { return &**m; }
> Why not &m[0][0]?

Just a matter of taste, I guess. Actually I'm not even sure yet
that it's wise to use a two dimensional array at all. T m[M*N]
would work equally well and since there's no interface yet that
relies on that structure, the latter might even be the simpler
approach. The two-dimensional array just felt to be more
'natural' for a matrix. (whatever that means :-) )

But thanks for your support,

>> The advantage of this approach is its simplicity, in fact, it's
> Right, I wrote such stuff already multiple times even if I care normally
> about sparse matrices with dimensions > 1 000 000.
> Jens
> _______________________________________________
> Unsubscribe & other changes:

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