Forums before death by AOL, social media and spammers... "We can't have nice things"
|    comp.lang.c++.moderated    |    Moderated discussion of C++ superhackery    |    33,346 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 31,507 of 33,346    |
|    Ulrich Eckhardt to All    |
|    Re: Using the STL for scientific program    |
|    30 Sep 11 11:11:37    |
      From: ulrich.eckhardt@dominalaser.com              Am 29.09.2011 20:04, schrieb nmm1@cam.ac.uk:       > Does anyone use the STL (and I mean the STL, not BOOST) for scientific       > programming and, if so, what parts and for what?              The STL has not been actively developed for something like a decade, but       large parts of it have been incorporated into the C++ standard library.       The question now is what exactly you mean, I'll assume that you mean the       C++ standard library (CSL).              Of the CSL, the most important parts to me are IOStreams and       containers/iterators/algorithms. In particular the latter are pretty       much used anywhere where sequences or mappings are handled in memory.                     > I am not talking about incidental use, but where it provides a major       > advantage over rolling one's own for the sort of programmer capable       > of writing a serious scientific program in a language like C++.              Why would you write your own? Getting things correct is a non-trivial       task. Getting optional diagnostics for undefined behaviour requires even       more work, work that has already been done in most implementations.       Unless I see a need to do something radically different, my time is too       valuable for reinventing, testing, debugging, benchmarking and       documenting rounder wheels, let alone teaching my colleagues how they roll.                     > The area I have looked at most closely is its array support, and I       > can't see that it provides anything worth bothering with. It is       > noteworthy that neither Bjarne's matrix.h nor BOOST make much use       > of them.              What do you mean with "array support"? In C++ an array is a       fixed-length, contiguous sequence of objects, like "char x[42]". In the       old C++ standard, they are a somehow unwanted child, in particular since       they don't provide any STL interfaces. Boost.Array has been written to       make up for this lack. If you mean a dynamically resizable array,       vector<> is what you are looking for.                     > I am interested in knowing which components and which areas of       > scientific programming it actually helps with, if any. I can see       > some uses for its associative containers, but haven't studied them       > in enough depth to see if they really do provide an advantage.              To be honest, I don't get what you want. As you noticed yourself,       science is a wide field and so is scientific programming. It would help       if you said what you want to achieve instead of asking whether something       vaguely specified can be done. You also seem to have some problems with       the CSL, suggest that others don't use it either, but with no word do       you describe what the problem really is. Honestly, it could easily be       that you are just using something in a way it is not intended - it's       impossible to tell with the available info.              Cheers!              Uli                     --        [ See http://www.gotw.ca/resources/clcm.htm for info about ]        [ comp.lang.c++.moderated. First time posters: Do this! ]              --- SoupGate-Win32 v1.05        * Origin: you cannot sedate... all the things you hate (1:229/2)    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca