Home Page -------------------
[Home Page] - [Reviews Main]
-------------------

Book Review
Algorithms and Data Structures in C++ by Leendert Ammeraal
Recommended with Reservations
ISBN: 0-471-96355-0       Publisher: Wiley       Pages: 352       Price: £24-95
Categories:   algorithms     data structures     advanced c++    
Reviewed by Alec Ross in C Vu 9-1 (Nov 1996)
If you have come across either of Ammeraal's previous books on data structures or C++ you are unlikely to be surprised or disappointed by this one. It lives up to an expectation that the author will have made a choice of clear tutorial examples, described them clearly in text and diagrams and provided clear, elegant, example code. The examples not only have clarity in their source code--when they are run they generally give a clear and very educational display of the dynamic changes occurring in the data structures concerned.

The subject matter covers related areas; a mathematical view of some standard data structures and algorithms and implementation of these in C++. Specifically it covers some topics in arithmetic (a class for large integers, calculation of pi to thousands of decimal places, etc.) sorting and searching, binary and B-trees, tries, graphs, combinatorial algorithms and fundamentals of interpreters and compilers. There are many texts covering this field of course, with different mixes of theory and code. (The bibliography of Ammeraal's book refers to some standard 'mathematical' texts; and for example, Dr Dobb's Journal does a good CD including eight books covering between them mathematical aspects and C/C++ implementations of such dynamic data structures and algorithms.)
The book's stated aim is 'to give breadth and depth to C++ programmers' existing experience of the language by representing a large number of algorithms, most of them implemented as ready-to-run (and standalone) programs'. It is appropriately designed and produced to do this--but it could also provide useful material for C++ programmers who already have a degree of maturity in both the use of the language and the data structures and algorithms involved.

The main criticisms that I have are described below. They are only to a limited degree concerned with use of the book for its stated objective, but rather with how far it goes in providing its readers with perspective of applying modern C++ to the domains discussed.

The book assumes that the reader is already fluent in C++, but provides some very selective and brief tutorial material at the start. Here, in Chapter one, there is coverage of templates and exceptions. Although there is some use of templated classes in the book (e.g. lists), they could be used more widely. The coverage of exceptions was very brief (2 pages). This was justified by the author on the basis that they are not yet widely available and consequently they are not used in the examples. I think that this section should have been expanded, or at least made it clear that it was an extremely (over-) simplified treatment of the subject. I would also have preferred to see an indication that while this approach allows the text to focus on its main concerns, a more detailed consideration of exceptions would be needed in the writing of production code.

As noted already, the examples are clear and easy to follow in their code. Part of this clarity comes from their being so specific to the task in hand. As presented, they make perhaps too little use of templates and little or no use of abstraction by way of Abstract Base Classes and polymorphic functions.

The text took no cognisance of the existence of the STL. There was not even an entry for it in the index. It seems to me that this is not justifiable for a text covering this subject with a copyright date of 1996. Not only is some of the material (e.g. on lists) directly replaceable by STL, some of the other data structures and algorithms covered could use STL facilities in their implementation. These possibilities should have been addressed in a book such as this--even if the design and implementation of the STL itself were not covered. Omitting the use of STL (and exceptions) lends portability over a wide range of current compilers in the field. However, I think that these aspects of C++ are so important and relevant to the subject matter of the book, that they merit a fuller treatment. Certainly the STL should have been discussed, even if it was not used in the code.

The source has been made available by FTP from ftp.expa.fnt.hvu.nl or pitel_lnx.ibk.fnt.hvu.nl. I recently downloaded it from the first of these sites. All the code I tried compiled and ran without modification on two compilers of widely different vintages.

I would have preferred if the main body of the text cited detailed references where relevant, or at least gave a bibliography for each chapter. Avoiding an academic style in this way hinders the reader who wishes to explore more mathematical treatments of the specific data structures and algorithms as they are covered.

Nevertheless, the material is considered to be excellent as tutorial and could be used as course text, for independent study, or for self- education or enlightenment on a specific topic. Any such use would be still further improved by supplementary reading of some of the standard texts covering data structures and algorithms in a language-independent way. An active reader could explore and develop the examples given, trying other approaches, or perhaps making industrial strength versions with relatively little effort.

In summary then, this is a very good treatment, well worth the price--but add your own thoughts on the use of exceptions and STL if you are going to use these techniques in your applications.


Other Authors with the same surname

Ammeraal
Algorithms and Data Structures in C++ by Leendert Ammeraal  (Reviewed May 1996)
C For Programmers -A Complete Tutorial based on the ANSI Standard(Second Edition) by Leendert Ammeraal [Recommended]  (Reviewed May 1991)
C++ for Programmers (2nd ed) by Leendert Ammeraal  (Reviewed Mar 1996)
C++ for Programmers 3ed by Leen Ammeraal [Not Recommended]  (Reviewed Sep 2000)
C++ for Programmers by Leendert Ammeraal [Recommended]  (Reviewed Nov 1991)
Computer Graphics for Java Programmers by Leen Ammeraal [Recommended]  (Reviewed Nov 1998)
Programming Principles in Computer Graphics (Second Edition) by Leendert Ammeraal [Recommended]  (Reviewed Nov 1992)
Programs and Data Structures in C (Second Edition) by Leendert Ammeraal  (Reviewed Mar 1992)
Win3D by Leendert Ammeraal  (Reviewed Nov 1994)
Windows Wisdom for C and C++ Programmers by Leendert Ammeraal  (Reviewed Feb 1994)
Windows Wisdom for C and C++ Programmers by Leendert Ammeraal  (Reviewed Nov 1993)


Last Update - 13 May 2001.

To link to this review, please use the URL: http://www.accu.org/bookreviews/public/reviews/a/a000163.htm

Copyright © The Association of C & C++ Users 1998-2000. All rights reserved.

Mirrored from http://www.accu.org/