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,535 of 33,346    |
|    Markus Wichmann to All    |
|    Re: Using the STL for scientific program    |
|    04 Oct 11 11:48:33    |
      From: nullplan@gmx.net              Well, I know of the following story: I was tasked with writing a program       that would calculate some distance between strings (It wasn't       Levenshtein's, but I don't know which it was anymore). It was the exam       for a course at University, so there were many implementations already,       but me and a fellow student wrote our own versions (how many people       copied his is unknown to date, but doesn't really matter). To test our       implementations, we were given two strings, each 10000 bytes long (some       genome sequences of fungi or so...).              The algorithm consisted basically of creating a matrix with the same       dimensions of the two strings and then doing strange stuff to it. The       professor didn't just want the score to be put out, but also the       "alignment" that would be retrieved through backtracing (i.e. I had to       create _two_ matrices, one for the score and one for the way to get it).       This alignment would output a whole lot of strings, because for each       cell there would be up to three ways to get in, so the upper bound for       just the number of strings was in O(3^n). Exponential growth is a bitch,       I can tell since then: The output would have been something like 1.5TB       (unavailable to me). (And the upper bound for output string length was       the sum of the dimensions).              My implementation didn't use the STL, not even for output. I learned       programming with Pascal, later continued with C and stuck to it. The       professor demanded C++ to be used, so I basically wrote C code with       strange include directives (i.e. " |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca