Complex ***C3tensor(long nrl,long nrh,long ncl,long nch,long ndl,long ndh); void free_C3tensor(Complex ***t, long nrl,long nrh,long ncl,long nch,long ndl,long ndh);Return value:
- C3tensor: pointer to three dimensional array of Complex
Input:
- nrl, nrh: lowest and highest values of indices for first index (rows)
- ncl, nch: lowest and highest values of indices for second index (columns)
- ndl, ndh: lowest and highest values of indices for third index (depth)
Write routines of the above prototypes. You should be able to do this with a simple replacement of ``Complex'' for every occurrence of ``double'' in your d3tensor routines.
C++ Note#1: The code in the appendix assumes that you have compiled nrutil.c with a standard c (not C++) compiler. This is what the statement at the top of pvector.C
extern "C"
{
#include "nrutil.h"
}
tells the compiler. If your nrutil.c is compiled with the C++
compiler, then remove the `extern ``C'' {}' parts of the statement and
use just `#include ``nrutil.h'''.
C++ Note#2: Many compilers treat programs whose names end in ``.c'' as standard c and programs ending in ``.C'' as C++.