You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Writing this down here so I can remember it one day, when I've submitted my thesis...
Right now we have an API for hashing kmers (calc_hash(**)) and reads (calc_hashes(**)). However, these have fixed hash functions (currently MurmerHash64). Ideally, it would be easier if we could drop in new hash functions using a common API rather than the spaghetti code / infinite-if-elif-elses the design currently uses.
I'm imagining a function that takes a string, a start position, an end position, and a std::function that wraps a given hash function with the necessary parameters. The signature might look something like:
where hashfunc is a wrapper around a hash function that might look like:
mkmh::hash_t murmurhash64(const char* seq, int offset, int end, int seed);
It's a little strange passing a nearly identical function to another one, but it means we could use multiple hash functions within mkmh without modifying the API (or even adding to the source code).
The text was updated successfully, but these errors were encountered:
Writing this down here so I can remember it one day, when I've submitted my thesis...
Right now we have an API for hashing kmers (
calc_hash(**)
) and reads (calc_hashes(**)
). However, these have fixed hash functions (currently MurmerHash64). Ideally, it would be easier if we could drop in new hash functions using a common API rather than the spaghetti code / infinite-if-elif-elses the design currently uses.I'm imagining a function that takes a string, a start position, an end position, and a
std::function
that wraps a given hash function with the necessary parameters. The signature might look something like:where hashfunc is a wrapper around a hash function that might look like:
It's a little strange passing a nearly identical function to another one, but it means we could use multiple hash functions within mkmh without modifying the API (or even adding to the source code).
The text was updated successfully, but these errors were encountered: