MCPcopy Create free account
hub / github.com/ElementsProject/elements / __init__

Method __init__

src/minisketch/tests/pyminisketch.py:379–384  ·  view source on GitHub ↗

Initialize an empty sketch with the specified field_size size and capacity.

(self, field_size, capacity)

Source from the content-addressed store, hash-verified

377 """
378
379 def __init__(self, field_size, capacity):
380 """Initialize an empty sketch with the specified field_size size and capacity."""
381 self.field_size = field_size
382 self.capacity = capacity
383 self.odd_syndromes = [0] * capacity
384 self.gf = GF2Ops(field_size)
385
386 def add(self, element):
387 """Add an element to this sketch. 1 <= element < 2**field_size."""

Callers

nothing calls this directly

Calls 1

GF2OpsClass · 0.85

Tested by

no test coverage detected