Boost logo

Ublas :

From: Toon Knapen (toon.knapen_at_[hidden])
Date: 2004-12-10 16:18:56

Hash: SHA1

Daniel L Elliott wrote:
| Hello,
| It's great to be able to post to uBLAS! :-)

yeahhhhh, isn't it.

| Unlike the maintainers of uBLAS, I am far from a c++ wizard. Is there a
| compelling reason to not include a default constructor for the
| permutation_matrix class found in lu.hpp? I guess this is would be
| useful to those of us who like to wastefully create superflous objects
in the
| name of letting the compiler take care of my memory for me.

I have not written the permutation_matrix and even never used it but I
took a quick look at it and there are several issues:

First of all, a permutation matrix is actually a vector that starts out
with elements that have a value that is equal to their index in the
vector. A permutation now induces a swap in this vector. If in this case
the vector has not the right size, you might want to swap unexisting
elements ! Or you need to check at every access using the operator[]
that the index is not out of bounds and if it is to resize the vector.
This would not be performant at all.

And so we come to the second issue: using uBLAS should give you optimal
performance (I know it's not there yet but we're working on it). Ease of
use and performance are sometimes opposite constraints. I therefor
prefer to make using uBLAS as easy as possible unless it hinders
performance. OTOH ease of use can also be added with good doc for instance.

| By the way, Toon, thank you very much for you help with the
| stuff!

I'm happy to be able to help out.
Version: GnuPG v1.2.1 (MingW32)
Comment: Using GnuPG with Thunderbird -