![]() |
Blitz Support : |
From: Russell L. Carter (rcarter_at_[hidden])
Date: 2005-04-27 21:43:59
Hmm, no responses. Ok, I've been off working on the
other end of my app and now I'm back to the more
interesting side...
Is something like "norm1" missing for a design reason?
Or would there be interest in a patch set that implemented
the norms available in other matrix libraries?
What's up with "Vector"? Condemned or being birthed?
Thanks,
Russell
Replying to:
Hi,
I'm quite new to blitz++, but not generic programming nor
Golub and Van Loan. After extensively reviewing what's
available I've decided to implement my current project
in blitz++. First steps are building blitz++ wrappers
for the lapack stuff implemented in atlas. For the test
functionality I first needed a 1-norm for matrices (Array<double, 2>).
I see there is a norm1 in the Vector class, but no mention
of Vector in the docs, nor much in google. It appears to
be old code, so something is up here. Oh well. So I wrote
my own:
for (int j = 0, norm1 = 0; j < M.columns(); ++j) {
norm1 = max(norm1, sum(abs(M(Range::all(), j))));
}
I see in the mail archives that (as usual) performance
is very sensitive to implementation, so since I'm a newbie,
if this isn't optimal, how does one do it in the best
blitzian way?
Second puzzle is how to efficiently permute the rows of a
matrix, given say an Array<int,1> of permuted rows
handed back by lapack routines. I see transpose and reindex
but these appear to reorder dimensions, not rows.
Any hints?
Thanks,
Russell