Boost logo

Boost :

Subject: Re: [boost] different matrix library?
From: Rutger ter Borg (rutger_at_[hidden])
Date: 2009-08-17 15:52:38


Edward Grace wrote:
>
> It's conceptually not very difficult but describing the regions you
> want can be tricky. The secret is the
>
> B(tgt{:}) = A(src{:})
>
> at the end which makes life very easy. How would one code this in C++
> for example? Give it a bash - it's trickier than it looks (I'm happy
> for tips to do this better by the way).
>

I see B is filled first, and values taken from A later on. In C++, would it
make sense to do this assignment inline at the point where you define source
and target ranges? Or, by adding (constructing) dimensions to B one at a
time once you know what they should contain?

For doing assignments, I tend to write functions that set up needed matrices
and vectors.

Cheers,

Rutger


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