On Saturday, 12 December 2015 at 20:12:49 UTC, Guillaume Chatelet wrote:
On Saturday, 12 December 2015 at 02:59:21 UTC, Ilya wrote:
Current version is suitable for arrays but not ranges or types.

Few examples:
1. Compute hash of ulong.
2. Compute hash of all elements in matrix column (element are in different arrays).

I have created output range API draft http://dpaste.dzfl.pl/a24050042758

Ilya

I created https://github.com/gchatelet/murmurhash3_d and updated the code a bit. It conforms to the digest template interface, allows pushing ulong[2] and accept ranges.

PR welcome :)

AFAICS this doesn't conform to the digest interface. For example, there should be a `finish` method that returns the hash as a static array (see the ExampleDigest [1]). More importantly, I believe your `put()` implementation only works if it is fed the entire data at once. I haven't tested it, but I believe that the following two calls will have a different result, while they should result in the same hash:

    hash.put([1,2,3,4,5,6]);

vs

    hash.put([1,2,3]);
    hash.put([4,5,6]);

[1] http://dlang.org/phobos/std_digest_digest.html#.ExampleDigest
  • MurmurHash3 Guillaume Chatelet via Digitalmars-d-announce
    • Re: MurmurHash3 Brad Anderson via Digitalmars-d-announce
    • Re: MurmurHash3 Ilya via Digitalmars-d-announce
    • Re: MurmurHash3 Ilya via Digitalmars-d-announce
      • Re: MurmurHash3 Guillaume Chatelet via Digitalmars-d-announce
        • Re: MurmurHash3 Ilya via Digitalmars-d-announce
          • Re: MurmurH... Guillaume Chatelet via Digitalmars-d-announce
            • Re: Mu... Marc Schütz via Digitalmars-d-announce
              • Re... Guillaume Chatelet via Digitalmars-d-announce
                • ... Guillaume Chatelet via Digitalmars-d-announce
                • ... Guillaume Chatelet via Digitalmars-d-announce
                • ... Marc Schütz via Digitalmars-d-announce

Reply via email to