Re: [BloomFilters] changes to BloomFilter

2020-03-17 Thread Claude Warren
Builder discussion: Let's go with >> Builder with(CharSequence, Charset); >> Builder withUnencoded(CharSequence); Shape Discussion: as for getNumberOfBytes() it should return the maximum number of bytes returned by a getBits() call to a filter with this shape. So yes, if there is a compressed

Re: [BloomFilters] changes to BloomFilter

2020-03-17 Thread Alex Herbert
> On 17 Mar 2020, at 17:06, Claude Warren wrote: > > On Tue, Mar 17, 2020 at 4:38 PM Alex Herbert > wrote: > >> >> >>> On 17 Mar 2020, at 15:41, Claude Warren wrote: >>> >>> I agree with the HashFunction changes. >> >> OK, but which ones? >> > > DOH! this one... > >> >> Changing Hash

Re: [BloomFilters] changes to BloomFilter

2020-03-17 Thread Claude Warren
On Tue, Mar 17, 2020 at 4:38 PM Alex Herbert wrote: > > > > On 17 Mar 2020, at 15:41, Claude Warren wrote: > > > > I agree with the HashFunction changes. > > OK, but which ones? > DOH! this one... > > Changing HashFunction to have two methods: > > long hash(byte[]) > long increment(int seed) >

Re: [BloomFilters] changes to BloomFilter

2020-03-17 Thread Alex Herbert
> On 17 Mar 2020, at 15:41, Claude Warren wrote: > > I agree with the HashFunction changes. OK, but which ones? Changing HashFunction to have two methods: long hash(byte[]) long increment(int seed) Or just correctly documenting what we have. And/or fixing the ObjectsHashIterative to be uns

Re: [BloomFilters] changes to BloomFilter

2020-03-17 Thread Claude Warren
I agree with the HashFunction changes. The only place I know of where more items are added to a hasher is in our test code. So I think just requiring Builder.build() to do a reset is correct solution. I think Builder should have with(byte[]) with(byte[], int offset, int len ) with(String) I find

Re: [BloomFilters] changes to BloomFilter

2020-03-17 Thread Alex Herbert
> On 17 Mar 2020, at 11:08, Claude Warren wrote: > > On Tue, Mar 17, 2020 at 12:28 AM Alex Herbert > > wrote: > >> >>> The Shape tells the hasher how many hash functions to apply to each item. >> >> OK. This is may misunderstanding. There is a contract that

Re: [BloomFilters] changes to BloomFilter

2020-03-17 Thread Claude Warren
On Tue, Mar 17, 2020 at 12:28 AM Alex Herbert wrote: > > > The Shape tells the hasher how many hash functions to apply to each item. > > OK. This is may misunderstanding. There is a contract that the Hasher is > expected to fulfil but it is just not recorded in the javadoc. I can update > the doc