| Home | Trees | Indices | Help |
|---|
|
|
_object --+
|
Finger
This class encapsulates most fingerprint operations.
Blank fingerprint:
>>> print Finger(128)
128.----------------------
Of course, a valid length must be passed:
>>> print Finger(-2394)
Traceback (most recent call last):
...
ValueError: FPmk: Len must > 0.
From Finger object:
>>> print ImmutableFinger(Finger('128.fue*3kdfj-J2dkf7Mk1*--'))
128.fue*3kdfj-J2dkf7Mk1*--
From string:
Fingerpints can be generated from fingerprint string consisting of:
1. an integer length
2. a period '.'
3. any number of characters selected from [a-z,A-Z,0-9,-,*]
>>> print Finger('128.fue*3kdfj-J2dkf7Mk1*')
128.fue*3kdfj-J2dkf7Mk1*--
Extra characters are truncated:
>>> print Finger('128.fue*3kdfj-J2dkf7Mk1*----------343432')
128.fue*3kdfj-J2dkf7Mk1*--
Illegal characters generates an exception.
>>> print Finger('182.*#,$$(Q*')
Traceback (most recent call last):
...
ValueError: FPin: error reading fingerprint. Most likely illegal character.
From random:
Fingerprints can be generated from a random number generator:
>>> f=Finger(120,.3)
A valid lenght and density must be used:
>>> f=Finger(-1,12.0)
Traceback (most recent call last):
...
ValueError: FPrand: len must > 0 and density must be bewteen 0 and 1 (inclusive).
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
__init__(self, Finger f) -> Finger
__init__(self, char c) -> Finger
__init__(self, int len, double density) -> Finger
__init__(self, int len) -> Finger
This class encapsulates most fingerprint operations.
Blank fingerprint:
>>> print Finger(128)
128.----------------------
Of course, a valid length must be passed:
>>> print Finger(-2394)
Traceback (most recent call last):
...
ValueError: FPmk: Len must > 0.
From Finger object:
>>> print ImmutableFinger(Finger('128.fue*3kdfj-J2dkf7Mk1*--'))
128.fue*3kdfj-J2dkf7Mk1*--
From string:
Fingerpints can be generated from fingerprint string consisting of:
1. an integer length
2. a period '.'
3. any number of characters selected from [a-z,A-Z,0-9,-,*]
>>> print Finger('128.fue*3kdfj-J2dkf7Mk1*')
128.fue*3kdfj-J2dkf7Mk1*--
Extra characters are truncated:
>>> print Finger('128.fue*3kdfj-J2dkf7Mk1*----------343432')
128.fue*3kdfj-J2dkf7Mk1*--
Illegal characters generates an exception.
>>> print Finger('182.*#,$$(Q*')
Traceback (most recent call last):
...
ValueError: FPin: error reading fingerprint. Most likely illegal character.
From random:
Fingerprints can be generated from a random number generator:
>>> f=Finger(120,.3)
A valid lenght and density must be used:
>>> f=Finger(-1,12.0)
Traceback (most recent call last):
...
ValueError: FPrand: len must > 0 and density must be bewteen 0 and 1 (inclusive).
|
__str__(self, void ?) -> char * In this module there are a large number of functions. They are partially organized by different * prefixes. * * FP = General purpose functions and functions for operating on standard folded fingerprints. * * FPD = Bit Decoders used to read fingerprints as binary data. This set of functions is used to * by the more complex compression schemes to decode fingerprints encoded by golomb.py. * * And a few definitions of different compressed types of fingerprints. Each of these types has a * special digit (G,S,P, or M) used at times to signal there usage in arguements. For example, * a FPSG???(FINGER *f1, FINGER *f2) would take a Sparse fingerprint for f1 and a Golomb fingerprint * for f2. * * FPG = Golomb Fingerprints encoded as described in golomb.py * FPS = Sparse fingerprints, storing 32-bit integers in system format. * FPP = Modified Elias Gamma MEG-I fingerprints as described in golomb.py. * FPM = Modified Elias Gamma MEG-R fingerprints as described in golomb.py. Some of these names may seem cryptic. Many of them are renamed much prettier names in prettyfinger.py. |
* In this module there are a large number of functions. They are partially organized by different * prefixes. * * FP = General purpose functions and functions for operating on standard folded fingerprints. * * FPD = Bit Decoders used to read fingerprints as binary data. This set of functions is used to * by the more complex compression schemes to decode fingerprints encoded by golomb.py. * * And a few definitions of different compressed types of fingerprints. Each of these types has a * special digit (G,S,P, or M) used at times to signal there usage in arguements. For example, * a FPSG???(FINGER *f1, FINGER *f2) would take a Sparse fingerprint for f1 and a Golomb fingerprint * for f2. * * FPG = Golomb Fingerprints encoded as described in golomb.py * FPS = Sparse fingerprints, storing 32-bit integers in system format. * FPP = Modified Elias Gamma MEG-I fingerprints as described in golomb.py. * FPM = Modified Elias Gamma MEG-R fingerprints as described in golomb.py. Some of these names may seem cryptic. Many of them are renamed much prettier names in prettyfinger.py.
|
__cmp__(self, Finger other) -> int * In this module there are a large number of functions. They are partially organized by different * prefixes. * * FP = General purpose functions and functions for operating on standard folded fingerprints. * * FPD = Bit Decoders used to read fingerprints as binary data. This set of functions is used to * by the more complex compression schemes to decode fingerprints encoded by golomb.py. * * And a few definitions of different compressed types of fingerprints. Each of these types has a * special digit (G,S,P, or M) used at times to signal there usage in arguements. For example, * a FPSG???(FINGER *f1, FINGER *f2) would take a Sparse fingerprint for f1 and a Golomb fingerprint * for f2. * * FPG = Golomb Fingerprints encoded as described in golomb.py * FPS = Sparse fingerprints, storing 32-bit integers in system format. * FPP = Modified Elias Gamma MEG-I fingerprints as described in golomb.py. * FPM = Modified Elias Gamma MEG-R fingerprints as described in golomb.py. Some of these names may seem cryptic. Many of them are renamed much prettier names in prettyfinger.py. |
__getitem__(self, int idx) -> int * In this module there are a large number of functions. They are partially organized by different * prefixes. * * FP = General purpose functions and functions for operating on standard folded fingerprints. * * FPD = Bit Decoders used to read fingerprints as binary data. This set of functions is used to * by the more complex compression schemes to decode fingerprints encoded by golomb.py. * * And a few definitions of different compressed types of fingerprints. Each of these types has a * special digit (G,S,P, or M) used at times to signal there usage in arguements. For example, * a FPSG???(FINGER *f1, FINGER *f2) would take a Sparse fingerprint for f1 and a Golomb fingerprint * for f2. * * FPG = Golomb Fingerprints encoded as described in golomb.py * FPS = Sparse fingerprints, storing 32-bit integers in system format. * FPP = Modified Elias Gamma MEG-I fingerprints as described in golomb.py. * FPM = Modified Elias Gamma MEG-R fingerprints as described in golomb.py. Some of these names may seem cryptic. Many of them are renamed much prettier names in prettyfinger.py. |
__and__(self, Finger o) -> Finger * In this module there are a large number of functions. They are partially organized by different * prefixes. * * FP = General purpose functions and functions for operating on standard folded fingerprints. * * FPD = Bit Decoders used to read fingerprints as binary data. This set of functions is used to * by the more complex compression schemes to decode fingerprints encoded by golomb.py. * * And a few definitions of different compressed types of fingerprints. Each of these types has a * special digit (G,S,P, or M) used at times to signal there usage in arguements. For example, * a FPSG???(FINGER *f1, FINGER *f2) would take a Sparse fingerprint for f1 and a Golomb fingerprint * for f2. * * FPG = Golomb Fingerprints encoded as described in golomb.py * FPS = Sparse fingerprints, storing 32-bit integers in system format. * FPP = Modified Elias Gamma MEG-I fingerprints as described in golomb.py. * FPM = Modified Elias Gamma MEG-R fingerprints as described in golomb.py. Some of these names may seem cryptic. Many of them are renamed much prettier names in prettyfinger.py. |
__or__(self, Finger o) -> Finger * In this module there are a large number of functions. They are partially organized by different * prefixes. * * FP = General purpose functions and functions for operating on standard folded fingerprints. * * FPD = Bit Decoders used to read fingerprints as binary data. This set of functions is used to * by the more complex compression schemes to decode fingerprints encoded by golomb.py. * * And a few definitions of different compressed types of fingerprints. Each of these types has a * special digit (G,S,P, or M) used at times to signal there usage in arguements. For example, * a FPSG???(FINGER *f1, FINGER *f2) would take a Sparse fingerprint for f1 and a Golomb fingerprint * for f2. * * FPG = Golomb Fingerprints encoded as described in golomb.py * FPS = Sparse fingerprints, storing 32-bit integers in system format. * FPP = Modified Elias Gamma MEG-I fingerprints as described in golomb.py. * FPM = Modified Elias Gamma MEG-R fingerprints as described in golomb.py. Some of these names may seem cryptic. Many of them are renamed much prettier names in prettyfinger.py. |
__setitem__(self, int idx, int v) * In this module there are a large number of functions. They are partially organized by different * prefixes. * * FP = General purpose functions and functions for operating on standard folded fingerprints. * * FPD = Bit Decoders used to read fingerprints as binary data. This set of functions is used to * by the more complex compression schemes to decode fingerprints encoded by golomb.py. * * And a few definitions of different compressed types of fingerprints. Each of these types has a * special digit (G,S,P, or M) used at times to signal there usage in arguements. For example, * a FPSG???(FINGER *f1, FINGER *f2) would take a Sparse fingerprint for f1 and a Golomb fingerprint * for f2. * * FPG = Golomb Fingerprints encoded as described in golomb.py * FPS = Sparse fingerprints, storing 32-bit integers in system format. * FPP = Modified Elias Gamma MEG-I fingerprints as described in golomb.py. * FPM = Modified Elias Gamma MEG-R fingerprints as described in golomb.py. Some of these names may seem cryptic. Many of them are renamed much prettier names in prettyfinger.py. |
* In this module there are a large number of functions. They are partially organized by different * prefixes. * * FP = General purpose functions and functions for operating on standard folded fingerprints. * * FPD = Bit Decoders used to read fingerprints as binary data. This set of functions is used to * by the more complex compression schemes to decode fingerprints encoded by golomb.py. * * And a few definitions of different compressed types of fingerprints. Each of these types has a * special digit (G,S,P, or M) used at times to signal there usage in arguements. For example, * a FPSG???(FINGER *f1, FINGER *f2) would take a Sparse fingerprint for f1 and a Golomb fingerprint * for f2. * * FPG = Golomb Fingerprints encoded as described in golomb.py * FPS = Sparse fingerprints, storing 32-bit integers in system format. * FPP = Modified Elias Gamma MEG-I fingerprints as described in golomb.py. * FPM = Modified Elias Gamma MEG-R fingerprints as described in golomb.py. Some of these names may seem cryptic. Many of them are renamed much prettier names in prettyfinger.py.
|
* In this module there are a large number of functions. They are partially organized by different * prefixes. * * FP = General purpose functions and functions for operating on standard folded fingerprints. * * FPD = Bit Decoders used to read fingerprints as binary data. This set of functions is used to * by the more complex compression schemes to decode fingerprints encoded by golomb.py. * * And a few definitions of different compressed types of fingerprints. Each of these types has a * special digit (G,S,P, or M) used at times to signal there usage in arguements. For example, * a FPSG???(FINGER *f1, FINGER *f2) would take a Sparse fingerprint for f1 and a Golomb fingerprint * for f2. * * FPG = Golomb Fingerprints encoded as described in golomb.py * FPS = Sparse fingerprints, storing 32-bit integers in system format. * FPP = Modified Elias Gamma MEG-I fingerprints as described in golomb.py. * FPM = Modified Elias Gamma MEG-R fingerprints as described in golomb.py. Some of these names may seem cryptic. Many of them are renamed much prettier names in prettyfinger.py.
|
* In this module there are a large number of functions. They are partially organized by different * prefixes. * * FP = General purpose functions and functions for operating on standard folded fingerprints. * * FPD = Bit Decoders used to read fingerprints as binary data. This set of functions is used to * by the more complex compression schemes to decode fingerprints encoded by golomb.py. * * And a few definitions of different compressed types of fingerprints. Each of these types has a * special digit (G,S,P, or M) used at times to signal there usage in arguements. For example, * a FPSG???(FINGER *f1, FINGER *f2) would take a Sparse fingerprint for f1 and a Golomb fingerprint * for f2. * * FPG = Golomb Fingerprints encoded as described in golomb.py * FPS = Sparse fingerprints, storing 32-bit integers in system format. * FPP = Modified Elias Gamma MEG-I fingerprints as described in golomb.py. * FPM = Modified Elias Gamma MEG-R fingerprints as described in golomb.py. Some of these names may seem cryptic. Many of them are renamed much prettier names in prettyfinger.py.
|
>>> hash(ImmutableFinger('128.12319fj329jewi93j1')) 1186272689 >>> hash(Finger('128.12319fj329jewi93j1')) Traceback (most recent call last): ... TypeError: This object is mutable and unhashable. |
>>> import pickle >>> f1=Finger(128,.3) >>> f1.id=100 >>> s=pickle.dumps(f1) >>> f2=pickle.loads(s) >>> f1==f2 1 >>> f2.id==f1.id 1 |
| Home | Trees | Indices | Help |
|---|
| Generated by Epydoc 3.0beta1 on Thu Nov 8 17:49:33 2007 | http://epydoc.sourceforge.net |