Re: C++ for combinatorial optimization problems
From: Dietmar Kuehl (dietmar_kuehl_at_yahoo.com)
Date: 09/16/04
- Next message: chris: "Re: Sort 3 numbers in a single line."
- Previous message: Alf P. Steinbach: "Re: can someone explain to me, a C/Hw guy, what the diff is between a reference (&) and a pointer?"
- In reply to: beliavsky_at_aol.com: "Re: C++ for combinatorial optimization problems"
- Next in thread: beliavsky_at_aol.com: "Re: C++ for combinatorial optimization problems"
- Reply: beliavsky_at_aol.com: "Re: C++ for combinatorial optimization problems"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 16 Sep 2004 07:13:44 -0700
beliavsky@aol.com wrote:
> I think C and C++ are not well suited to problems involving
> multidimensional arrays, which are most of the problems I deal with.
Why not? I haven't done any stuff relating to matrix stuff myself
but my understanding is that libraries like Blitz++ are quite
effective.
> IMSL and NAG have Fortran 77, Fortran 90, and C libraries, but not
C++
> libraries AFAIK.
There can be many reasons for this. For example, it is quite likely
that these people program in Fortran since ages and are essentially
ignorant of C++. ...and I would guess that their C library is actually
just a header providing access to their Fortran library.
> They expect C++ programmers to call their C
> libraries. Do IMSL and NAG only implement "trivial" algorithms?
This is not what I claimed. Actually, you can probably implement
arbitrary algorithms in all Turing-complete programming languages. The
question is how much support you get and how easy the algorithms are
to use. I claim that the support you get from C++ is better suited for
non-trivial algorithms than the support you get from languages like
Fortrand and/or C (for trivial algorithms like searching an entry in
an array, support in most languages is sufficient).
> The Numerical Recipes C++ library is not that different from the C
> version.
Which would be an indication that the author of "Numerical Recipes C++"
is also ignorant of C++. I can't tell for this specific book but I can
tell for Sedgewick's "Algorithms in C++" (at least earlier editions: I
buoght this book around 1992 and was happy to get rid of it...) that a
better suited name would have been "Algorithms originally written in
Pascal than converted to compile with C and then converted to use C++
classes". That is, just because someone claims to use C++ doesn't mean
he indeed uses C++. There is the old saying "Real programmers program
Fortran in any language".
-- <mailto:dietmar_kuehl@yahoo.com> <http://www.dietmar-kuehl.de/> <http://www.contendix.com> - Software Development & Consulting
- Next message: chris: "Re: Sort 3 numbers in a single line."
- Previous message: Alf P. Steinbach: "Re: can someone explain to me, a C/Hw guy, what the diff is between a reference (&) and a pointer?"
- In reply to: beliavsky_at_aol.com: "Re: C++ for combinatorial optimization problems"
- Next in thread: beliavsky_at_aol.com: "Re: C++ for combinatorial optimization problems"
- Reply: beliavsky_at_aol.com: "Re: C++ for combinatorial optimization problems"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|