A space-efficient probabilistic membership structure for LONG keys. False positives are possible; false negatives are not.
A space-efficient probabilistic membership structure for LONG keys. False positives are possible; false negatives are not.
Kind: Container | Category: H-Lib Native Containers
PBXB64 Status: AVAILABLE
PBXB64 Certification: [CERTIFIED TESTED]
This H-Lib container is implemented in native C support code and exposed through PBXB64 BASIC container syntax. The examples below are focused usage patterns; keep handles valid, release each container with its Final method, and check counts or return values when a method can fail.
| Method | Signature | Returns | Description |
|---|---|---|---|
| New | b.New capacity, target_fpp | LNBLOOM | Allocate a filter for the expected item count and target false-positive probability. |
| Final | b.Final | none | Free the filter. |
| Validate | b.Validate | LONG | Non-zero if the handle is valid. |
| Clear | b.Clear | none | Remove all inserted keys. |
| Count | b.Count | LONG | Number of keys added. |
| Capacity | b.Capacity | LONG | Expected maximum item count. |
| Add | b.Add key | none | Insert a key. |
| Contains | b.Contains key | LONG | Non-zero if the key may be present. |
| FalsePositiveRate | b.FalsePositiveRate | DOUBLE | Estimated current false-positive rate. |
| ErrorRate | b.ErrorRate | DOUBLE | Konfigurierte Zielrate für falsch-positive Ergebnisse. |
| Empty | b.Empty | LONG | Ungleich Null, wenn noch kein Schlüssel hinzugefügt wurde. |
| Trim | b.Trim | none | Normalisiert den internen Speicher. |
| Clone | b.Clone | LNBLOOM | Gibt eine unabhängige Kopie des Filters zurück. |
Validation evidence: H-Lib container behavior is exercised by registered BASIC container validation programs and the embedded H-Lib object set used by the single-EXE validation gate.
Diese Referenzseite soll durch ein fokussiertes Compile- oder Laufzeitbeispiel belegt sein. Das Beispiel soll Eingaben, erwartete Ausgabe oder Exit-Code und erforderliche Windows-Ressourcen oder Include-Dateien nennen.
Allgemeine Übersichtsseiten sollten trotzdem sagen, welche Familie gemeint ist, welche konkreten Befehlsseiten die Implementierung tragen und welche Formen nur der Navigation dienen. So bleibt die Seite detailliert genug, ohne so zu tun, als wäre sie eine vollständige Befehlsreferenz.
LOCAL b AS LNBLOOM LOCAL fpr AS DOUBLE b = b.New 1000, 0.01 b.Add 42 PRINT b.Contains 42 ' non-zero fpr = b.FalsePositiveRate b.Final