Skip to content

Commit

Permalink
Removed hashing_function from public facing API
Browse files Browse the repository at this point in the history
  • Loading branch information
christofsteel committed Aug 13, 2024
1 parent 8993d4c commit a4c7887
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions clsp/enumeration.py
Original file line number Diff line number Diff line change
Expand Up @@ -217,10 +217,9 @@ def enumerate_terms(
grammar: ParameterizedTreeGrammar[S, T],
max_count: Optional[int] = None,
max_bucket_size: Optional[int] = None,
hashing_function: Optional[Callable[[Tree[T]], int]] = None,
) -> Iterable[Tree[T]]:
return itertools.islice(
enumerate_terms_fast(start, grammar, max_count, max_bucket_size, hashing_function),
enumerate_terms_fast(start, grammar, max_count, max_bucket_size),
max_count,
)

Expand Down Expand Up @@ -795,7 +794,10 @@ def __call__(self, a: str, b: str) -> str:
start = timeit.default_timer()

for i, r in enumerate(
enumerate_terms("X", d, max_count=10_000, hashing_function=lambda t: t.size)
itertools.islice(
enumerate_terms_fast("X", d, max_count=10_000, hashing_function=lambda t: t.size),
10_000,
)
):
# print(i)
pass
Expand Down

0 comments on commit a4c7887

Please sign in to comment.