[Numpy-discussion] Wiener filter / decorrelation
sturla at molden.no
Thu Jan 27 17:47:47 EST 2011
Den 25.01.2011 23:21, skrev Jonathan Rocher:
> Actually I believe the version does matter: I have seen a C version of
> num rec that doesn't contain all the algorithmic part but only the
> codes. I cannot remember exactly which ones are the light versions. If
> I had to guess, the F90 is also a light version and that's why I
> bought the F77 book.
The F90 version is meant to be read in conjunction with the F77 version,
not alone. It is very useful for NumPy programmers, as it is one of few
text books that deals with vectorisation of algorithms. (F90 is an
array-oriented language like Matlab and NumPy.) It is also the NR
version with the "cleanest" source code examples.
NR in C uses a nasty (and illegal) hack to get base-1 arrays in C. It is
also notorious for numerically unstable code, and should never have been
published. That is why the authors later published "NR in C++" to rescue
NR's third edition is utterly atrocious. It uses C++ OOP for code
obfuscation, such as inheritance and functors (objects instead of
functions), which is not instructive at all in explaining "numerical
methods". They also play with methods and inheritance in structs, not
just classes, which can confuse readers not knowing the dusty corners of
C++. The text is also messier to read, less organized, and some of it is
bady written compared to previous editions. But the scope is more
extensive. It has many valuable details that should have been covered in
previous versions, but it is presented in a way that makes me barf.
Also beware of common NR pitfalls like unstable SVD, slow FFTs, bad
PRNGs, etc. Always use proper libraries like LAPACK, BLAS, FFTW, et al.
NR code is just for inspiration.
More information about the NumPy-Discussion