Numerical Methods, Algorithms and Tools in C#

Author: Waldemar Dos Passos
Publisher: CRC Press, 2009 
Pages: 600
ISBN: 978-0849374791
Aimed at: Implementers of practical code
Rating: 4
Pros: Comprehensive collection of algorithms
Cons: No downloadable code 
Reviewed by: Mike James

There is nothing quite like a numerical methods project -. It's neat, self-contained and you usually know when you have done it right. I can only guess that writing a book on the subject has the same appeal. Numerical methods are technical in the sense you need to know the maths, but generally the problems of actually coding are few and easy to focus on. No messy user interfaces, no asynchronous code, no web services and so on.

This particular book is unusual in that it presents the standard algorithms not in one of the "standard" languages for the job e.g. C or Fortran, but in C#. The author does a reasonable job of introducing C# in a brisk "these are the main features" sort of way. In most cases you will need to be familiar with another strongly-typed block structured language to follow the explanation.

After this the book dives straight into numerical methods with implementations of the standard operations on vectors and matrices - first the real case and then the complex case. This is all done in a reasonable object-oriented style but advanced features such as generics are not used on the grounds of efficiency. In fact any deep discussion of efficiency and C#'s efficiency is something missing.

The real question you have to ask yourself is whether or not C# is a suitable system for implementing numeric and other demanding algorithms. It also doesn't really tackle the difficult problem of parallelizing algorithms for "industrial" quality number crunching. This said the book does present some clear and neat classes and methods that implement the standard algorithms.

Moving on to more general algorithms Chapter Five deals with searching and sorting, including Quicksort and a range of other sub-optimal algorithms - including  some that really should be avoided in practice. Then we have an odd chapter on bit manipulation only to return to numerical methods with interpolation, linear equations (Gauss-Jacobi and Gauss-Seidel and simple eigen problems), nonlinear equations (mainly simple uni-variate methods, e.g. Newton's).

The chapter on random numbers was particularly interesting in that it discuses the difference between pseudo and real random numbers and cites a few online sources of real random values. There are also methods for generating various distributions but it stops well short of any modern methods such as Markov chains.

After this we return to some mainstream numerical methods in the form of differentiation and integration. The final section of the book returns again to algorithms for computing statistics then on to special functions, curve fitting, solving differential and partial differential equations The final chapter is perhaps the most advanced and covers optimization - including gradient descent, linear programming and most surprisingly the genetic algorithm.

The algorithms presented are all well-known and you can find implementations elsewhere but usually in languages other than C#. The advantage of owning a copy of this book is to have these classical algorithms collected together on your bookshelf in a language that you want to use. There appears to be no download available for the library and this suggests that the main aim of the book is educational - entering the algorithms and debugging them is an education in its own right.

Last Updated ( Thursday, 17 December 2009 )