Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

words function is slow #8

Open
beyazit-y opened this issue Jan 29, 2025 · 0 comments
Open

words function is slow #8

beyazit-y opened this issue Jan 29, 2025 · 0 comments

Comments

@beyazit-y
Copy link

For some RAD DFAs, the words function is slow. An example is given below.

from dfa.utils import words
from dfa_samplers import RADSampler

sample_size = 100
w_size_bound = 10

sampler = RADSampler(p=None)
dfa = sampler.sample()
gen_word = (w for w in words(dfa) if len(w) <= w_size_bound)

print(dfa)

sample_words = [next(gen_word) for w in range(sample_size)]

print(sample_words)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant