home bbs files messages ]

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,502 of 33,346   
   =?ISO-8859-15?Q?Daniel_Kr=FCgler?= to All   
   Re: Using the STL for scientific program   
   29 Sep 11 16:38:38   
   
   From: daniel.kruegler@googlemail.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?   
   >   
   > 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++.   
   >   
   > I am not talking about computer science, which can be argued to be   
   > either an engineering discipline or mathematics, but is not a science   
   > in modern usage (i.e. "those branches of study that relate to the   
   > phenomena of the material universe and their laws"), including the   
   > more mathematically solid aspects of the social sciences.   
   >   
   > 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.   
   >   
   > 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.   
      
   I'm indeed working with STL components in purely scientific projects   
   since years. E.g. in a program to compute Franck-Condon factors and   
   derived values to simulate vibrational spectra of molecules I'm using   
   associative containers (Often std::map, but arguably most of them are   
   unordered containers), where I need to use the pre-standard   
   implementations because I have to support older compiler versions), a   
   lot of  std::vector (internally), std::pair, IO streams for outputs (IO   
   manipulators), std::exceptions for hard errors, and std::string objects.   
   Further, I'm taking massively advantage of STL algorithms, including   
   those from numeric. I can confirm that my matrix class templates and my   
   mathematical vector templates don't contain or derive from STL   
   containers and where written by myself to make it easier to write my   
   analytical expressions. Originally I had several usages of   
   std::vector (which is some kind of dynamic bitset), but later   
   replaced these by boost::dynamic_bitset because it provides the   
   functionality that I needed. When I would restart a new project with a   
   C++11 library I would have a lot of good usages for the new random   
   number library and for the new time components from std::chrono in   
   addition to unordered containers and std::function or std::tuple.   
   I still have some usages of std::auto_ptr (but most of them have been   
   replaced by boost components which are now standard in C++11).   
      
   I hope this gave a little impression.   
      
   Greetings from Bremen,   
      
   Daniel Krügler   
      
      
   --   
         [ 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