![]() |
Lumiera 0.pre.04
»edit your freedom«
|
Definition at line 49 of file hash-generator-test.cpp.
Private Types | |
| typedef boost::hash< string > | BoostStringHasher |
| typedef std::map< size_t, string > | StringsTable |
Private Member Functions | |
| virtual void | run (Arg) |
| void | demonstrate_boost_hash_weakness () |
| void | verify_Knuth_workaround () |
|
private |
Definition at line 61 of file hash-generator-test.cpp.
|
private |
Definition at line 62 of file hash-generator-test.cpp.
|
inlineprivatevirtual |
Definition at line 53 of file hash-generator-test.cpp.
References HashGenerator_test::demonstrate_boost_hash_weakness(), and HashGenerator_test::verify_Knuth_workaround().
Here is the call graph for this function:
|
inlineprivate |
This problem is especially dangerous when storing objects keyed by a string-id, which is generated from running numbers.
Definition at line 76 of file hash-generator-test.cpp.
Referenced by HashGenerator_test::run().
Here is the caller graph for this function:
|
inlineprivate |
In our case, it is sufficient to apply this trick to the trailing four digits; without this trick, we get the first collisions after about 20000 running numbers.
Definition at line 124 of file hash-generator-test.cpp.
References lib::rani().
Referenced by HashGenerator_test::run().
Here is the call graph for this function:
Here is the caller graph for this function:
Inheritance diagram for HashGenerator_test:
Collaboration diagram for HashGenerator_test: