Matrix calculations? (+, -, *, /, sin, cos, etc)


krhohio
11-18-2004, 08:07 AM
Hello,

We need to do some basic matrix calculations.
Does the NRMat class support these directly or
is other code in the NR namespace required?

Any references to the book or machine readable
files (we just purchased both) is appreciated!

Thanks,
Kent

Kevin Dolan
11-18-2004, 10:13 AM
The NR software does not support this directly, but there are other classes which you can substitute for the NRVec and NRMat classes which do.

For example, the NR book explains how to substitute the Standard Template Library's valarray class for the NRVec class.

I have also written a software package which provides a vector and matrix class which can be used with NR C++. It provides all of the basic arithmetic operations, as well as many support functions such as matrix multiplication, reading and writing to streams, statistical operations, and random number generation.

You can find it here:

http://kdolan.mine.nu/kevin/vecmat/VM_Software.htm

There is a link to an old version here on the NR website, under the user contributions section. The old webpage which they have a link to is no longer there, though. Feel free to email me with any questions if you are interested in using this software.


Kevin Dolan
kdolan@mailaps.org