Skip to content

words function is slow #8

Open
Open
@beyazit-y

Description

@beyazit-y

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions