Don't ask to ask, just ask | |
PerlMonks |
Re^5: Bidirectional lookup algorithm? (Solution.)by BrowserUk (Patriarch) |
on Jan 24, 2015 at 19:22 UTC ( [id://1114379]=note: print w/replies, xml ) | Need Help?? |
That's interesting how much extra space it takes to build the structure, and possibly part of why such algorithms aren't already coded up in a lot of libraries, given that the CHM algorithm dates back to 1992. The DAG is only needed whilst the algorithm is searching for the perfect hash function. Once the hash function has been discovered, the DAG is discarded and the data can be stored in a very simple hash structure; basically just an array indexed by the generated hash function. For many applications -- spell checkers and the like -- where the dictionary is known in advance, the hash function is generated in a separate process and the simple hash table generated and stored to disk. The applications that use the hashtable just load it up at startup and use the generated hash function to look things up in the table. It's because my application generates essentially random datasets at runtime, and a different dataset for each run, that makes CHM unsuitable for my application. With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
I'm with torvalds on this
In the absence of evidence, opinion is indistinguishable from prejudice. Agile (and TDD) debunked
In Section
Seekers of Perl Wisdom
|
|