On Mon, 2006-11-27 at 19:46 +0000, Chris Cannam wrote: > I saved off the tarball and tried building it, and got > > In file included from Data_Structure.hpp:12, > from Data_Structure.cpp:1: > Hash_Map.hpp:6:26: ext/hash_fun.h: No such file or directory > > This is clearly related to the recent questions about hash functions, > but I don't recall where ext/hash_fun.h should be coming from. (I'm > using g++ 3.3.5 on Debian if it matters.)
I have been using g++ 4.1 so it might be a compiler issue. > Probably irrelevant, but had I been here when that thread was active I'd > probably have suggested forgetting about hashes and using the obvious > std::map with string keys, until and unless you can demonstrate that > there is a difference in performance and that it actually matters. > (Remembering that the time taken to generate a hash of a string key may > be just as much as that to find the string in a tree-based map, > depending on the size of the map and the length and other properties of > the keys -- and neither is very likely to figure in your overall > runtime unless you do an awful lot of lookups.) I am trying to find out of a particular shape is present in the list. The idea was to make a hash of the string which represents the chords (e.g. x;x;0;2;3;2 for D major). So that way I could quickly look up the shape. The time it takes to generate the chords for a scale is about 5 msec right now. It takes about 22 seconds to generate all the chords for the 378 possible combitions of scale, triad and type. That is the reasoning behind using a hash as the key and the std::map as the container. Stephen ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Rosegarden-devel mailing list [email protected] - use the link below to unsubscribe https://lists.sourceforge.net/lists/listinfo/rosegarden-devel
