This is bloom-filter.egg.info, produced by makeinfo version 4.7 from
eggdoc-output.texi.

INFO-DIR-SECTION The Algorithmic Language Scheme
START-INFO-DIR-ENTRY
* bloom-filter.egg: (bloom-filter.egg).		Provides a simple Bloom Filter
END-INFO-DIR-ENTRY


File: bloom-filter.egg.info,  Node: Top,  Next: About this egg,  Up: (dir)

bloom-filter egg
****************

Provides a simple Bloom Filter

Written by Kon Lovett (mailto:klovett@pacbell.net)

   This manual corresponds to version 1.1 of the bloom-filter extension
library for Chicken Scheme.

* Menu:

* About this egg::
* Documentation::
* References::
* License::
* Index::


File: bloom-filter.egg.info,  Node: About this egg,  Next: Documentation,  Prev: Top,  Up: Top

1 About this egg
****************

* Menu:

* Version history::
* Requirements::
* Usage::


File: bloom-filter.egg.info,  Node: Version history,  Next: Requirements,  Up: About this egg

1.1 Version history
===================

`1.1'
     Support for "optimal K"

`1.0'
     Exports

`0.2'
     Add hash primitives configuration file

`0.1'
     Initial release


File: bloom-filter.egg.info,  Node: Requirements,  Next: Usage,  Prev: Version history,  Up: About this egg

1.2 Requirements
================

This egg requires the following extensions:

   `iset', `hashes', `md5', `sha1', `sha2', `tiger-hash', `ripemd',
`message-digest', `lookup-table', `mathh', `misc-extn'


File: bloom-filter.egg.info,  Node: Usage,  Prev: Requirements,  Up: About this egg

1.3 Usage
=========

Load this egg like so:

   `(require-extension bloom-filter)'


File: bloom-filter.egg.info,  Node: Documentation,  Next: References,  Prev: About this egg,  Up: Top

2 Documentation
***************

* Menu:

* Bloom Filter Object::
* Auxillary Procedures::
* Hash Primitives Configuration File::


File: bloom-filter.egg.info,  Node: Bloom Filter Object,  Next: Auxillary Procedures,  Up: Documentation

2.1 Bloom Filter Object
=======================

 -- procedure: make-bloom-filter
          (make-bloom-filter M MESSAGE-DIGEST-PRIMITIVE-LIST [K])

     Returns a bloom-filter object with `M' bits of 					discrimination and
     a set of hash functions built from the 					supplied
     `MESSAGE-DIGEST-PRIMITIVE-LIST'. The 					elements of the list
     of primitives may be an actual primitive 					object or a
     symbol naming the desired message-digest.

     The number of hash functions, k, is not necessarily the
     same as the number of message-digests. A hash function is
     defined as returning an unsigned 32 bit integer. Most
     message-digests return more 32 bits of hash. The actual length 					of
     the hash is divided into 32 bit blocks to get the 					individual hash
     functions.

     The argument `K' will restrict the actual number 					of hash functions
     to the "first" k, no matter how many more 					the supplied
     message-digests create. First in the order of
     `MESSAGE-DIGEST-PRIMITIVE-LIST'.

     Selecting the optimal set of message-digests is beyond the 					scope
     of `make-bloom-filter'.

 -- procedure: bloom-filter-n
          (bloom-filter-n BLOOM-FILTER)

     The current population - the number of objects added to the filter.

 -- procedure: bloom-filter-m
          (bloom-filter-m BLOOM-FILTER)

     The number of bits of discrimination.

 -- procedure: bloom-filter-k
          (bloom-filter-k BLOOM-FILTER)

     The number of hash functions. (See above.)

 -- procedure: bloom-filter-p-false-positive
          (bloom-filter-p-false-positive BLOOM-FILTER [N])

     The probability of false positives for the given population 					size.
     The current population is assumed.

 -- procedure: bloom-filter-set!
          (bloom-filter-set! BLOOM-FILTER OBJECT)

     Add the specified `OBJECT' to the indicated `BLOOM-FILTER'.

 -- procedure: bloom-filter-exists?
          (bloom-filter-exists? BLOOM-FILTER OBJECT)

     Is the specified `OBJECT' in the indicated `BLOOM-FILTER'.


File: bloom-filter.egg.info,  Node: Auxillary Procedures,  Next: Hash Primitives Configuration File,  Prev: Bloom Filter Object,  Up: Documentation

2.2 Auxillary Procedures
========================

 -- procedure: bloom-filter:optimum-k
          (bloom-filter:optimum-k N M)

     Optimal count of hash functions for the given population
     size `N' and `M' bits of discrimination.

 -- procedure: bloom-filter:optimum-m
          (bloom-filter:optimum-m K N)

     Optimal count of bits of discrimination for the given
     population size `N' and `K' number of hash 					functions.

 -- procedure: bloom-filter:p-false-positive
          (bloom-filter:p-false-positive K N M)

     What is the probability of false positives for the
     population size `N' assuming `K' hash 					functions and `M'
     bits of discrimination.

 -- procedure: bloom-filter:desired-m
          (bloom-filter:desired-m P N [K])

     Calculates a near-optimal number of bits of discrimination 					to meet
     the desired probability of false positives `P', 					with the given
     population size `N' and number of hash 					functions `K'. When
     the k parameter is missing the `bloom-filter:optimum-k' procedure
     is used to calculate a 					value.

     A multi-valued return of the calculated M, K, and P values.  					The
     calculated probability may be lower than the desired.

 -- procedure: bloom-filter:actual-k
          (bloom-filter:actual-k MESSAGE-DIGEST-PRIMITIVE-LIST)

     Calculates the actual number of hash functions for the
     `MESSAGE-DIGEST-PRIMITIVE-LIST'. The elements of the list of
     primitives may be an actual primitive object or a symbol naming
     the desired message-digest.

 -- procedure: bloom-filter:p-random-one-bit
          (bloom-filter:p-random-one-bit K N M)

     Guess.


File: bloom-filter.egg.info,  Node: Hash Primitives Configuration File,  Prev: Auxillary Procedures,  Up: Documentation

2.3 Hash Primitives Configuration File
======================================

A file, "hash-primitives-info", is located in the Chicken
Repository. The file contains the information needed by
bloom-filter to load hash primitives at runtime. The file is
self-documenting.


File: bloom-filter.egg.info,  Node: References,  Next: License,  Prev: Documentation,  Up: Top

3 References
************

   * Nice exposition of Bloom Filter False Positive Probability.
     (http://www.cs.wisc.edu/~cao/papers/summary-cache/node8.html#SECTION00053000000000000000)

   * A web interface for a better version of `bloom-filter:desired-m'.
     (http://www.cc.gatech.edu/fac/Pete.Manolios/bloom-filters/calculator.html)



File: bloom-filter.egg.info,  Node: License,  Next: Index,  Prev: References,  Up: Top

4 License
*********


Copyright (c) 2006, Kon Lovett.  All rights reserved.

Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the Software),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED ASIS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.


File: bloom-filter.egg.info,  Node: Index,  Prev: License,  Up: Top

Index
*****

 [index ]
* Menu:

* bloom-filter-exists?:                  Bloom Filter Object.  (line 57)
* bloom-filter-k:                        Bloom Filter Object.  (line 41)
* bloom-filter-m:                        Bloom Filter Object.  (line 36)
* bloom-filter-n:                        Bloom Filter Object.  (line 31)
* bloom-filter-p-false-positive:         Bloom Filter Object.  (line 46)
* bloom-filter-set!:                     Bloom Filter Object.  (line 52)
* bloom-filter:actual-k:                 Auxillary Procedures. (line 38)
* bloom-filter:desired-m:                Auxillary Procedures. (line 26)
* bloom-filter:optimum-k:                Auxillary Procedures. (line  7)
* bloom-filter:optimum-m:                Auxillary Procedures. (line 13)
* bloom-filter:p-false-positive:         Auxillary Procedures. (line 19)
* bloom-filter:p-random-one-bit:         Auxillary Procedures. (line 46)
* make-bloom-filter:                     Bloom Filter Object.  (line  7)



Tag Table:
Node: Top252
Node: About this egg634
Node: Version history824
Node: Requirements1097
Node: Usage1412
Node: Documentation1583
Node: Bloom Filter Object1819
Node: Auxillary Procedures3985
Node: Hash Primitives Configuration File5808
Node: References6204
Node: License6643
Node: Index7829

End Tag Table
