Boost logo

Boost :

Subject: Re: [boost] Contributing in the algorithm library
From: mohammad sharique (1sharique1_at_[hidden])
Date: 2018-01-21 17:46:10


Hi,

> Thank you for going through my proposal. Hld and centroid decomposition
> will really be a good addition and I have also worked on them before.
> My entire idea of including polynomial hashing was , even if he take a low
> prime number to hash like 2 , then also we won't be able to hash a string
> of length greater than 63 because long long is of size < 2^64 , so in every
> case we will be calculating hash modulo a prime number , now if we want to
> find the value between a range in the string then we have to apply modulo
> inverse , we can't directly just substract from cumulative array , so I
> thought automating everything in the library will be a really good addition
> .
>

Actually we can query hash for any substring/subarray after we apply
polynomial hash, without using inverse module. I'd suggest to look it up.
Also, imho it is way too trivial to be included separately. Do you have any
particular reason to include it?

Regards,
Sharique


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk