
17 Aug
2009
17 Aug
'09
7:52 p.m.
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