class
Crowbar::Evolution::UniquenessFilter
- Crowbar::Evolution::UniquenessFilter
- Reference
- Object
Overview
Radix/LRU Deduplication and Uniqueness Filter. Tracks 64-bit FNV-1a digests of generated test cases in a bounded ring buffer. Prevents redundant duplicate emissions and verifies output diversity.
Defined in:
crowbar/evolution/uniqueness_filter.crConstructors
Class Method Summary
- .hash_buffer(buf : Buffer) : UInt64
-
.hash_bytes(slice : Bytes) : UInt64
Fast 64-bit FNV-1a hashing of byte slices
Instance Method Summary
-
#add(hash : UInt64) : Nil
Adds a hash digest to the filter, evicting the oldest when at capacity
- #add(buf : Buffer | Bytes) : UInt64
- #capacity : Int32
- #capacity=(capacity : Int32)
- #clear : Nil
-
#filter(buf : Buffer | Bytes) : Bool
Tests and records a buffer: returns true if unique (added), false if already seen
-
#load_hashes(hashes : Array(UInt64)) : Nil
Import hashes from serialized state
- #ring_order : Deque(UInt64)
-
#seen?(hash : UInt64) : Bool
Checks if a hash digest has already been recorded
- #seen?(buf : Buffer | Bytes) : Bool
- #seen_hashes : Set(UInt64)
- #size : Int32
-
#to_a : Array(UInt64)
Export hashes for serialization
Constructor Detail
Class Method Detail
Instance Method Detail
def add(hash : UInt64) : Nil
#
Adds a hash digest to the filter, evicting the oldest when at capacity
Tests and records a buffer: returns true if unique (added), false if already seen