VeriFIT / mata

A fast and simple automata library
MIT License
23 stars 13 forks source link

Simplifying get_useful_states with move iterator #353

Closed kilohsakul closed 1 year ago

kilohsakul commented 1 year ago

Look at this to see an ultimate demonstration of the coolness of the davids move iterator.

Although, I am wandering whether it can be used anywhere else then here. I did not come with a good usage in the intersection for instance, because I wanted to get the vectors ot targets with the same symbol and then merge them. Maybe it is just my fault, but maybe we actually need something a bit different, I don't know. For instance, iterator through symbol_post that skips over symbols where there are no targets ... Just thinking.

kilohsakul commented 1 year ago

Just a straightforward use of the move iterator, should be no brainer.

codecov[bot] commented 1 year ago

Codecov Report

Attention: 1 lines in your changes are missing coverage. Please review.

Comparison is base (8684c78) 71.59% compared to head (d92fe19) 71.52%. Report is 1 commits behind head on devel.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## devel #353 +/- ## ========================================== - Coverage 71.59% 71.52% -0.07% ========================================== Files 30 30 Lines 3622 3603 -19 Branches 835 830 -5 ========================================== - Hits 2593 2577 -16 + Misses 737 736 -1 + Partials 292 290 -2 ``` | [Files](https://app.codecov.io/gh/VeriFIT/mata/pull/353?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=VeriFIT) | Coverage Δ | | |---|---|---| | [include/mata/nfa/delta.hh](https://app.codecov.io/gh/VeriFIT/mata/pull/353?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=VeriFIT#diff-aW5jbHVkZS9tYXRhL25mYS9kZWx0YS5oaA==) | `90.41% <100.00%> (-0.13%)` | :arrow_down: | | [src/nfa/nfa.cc](https://app.codecov.io/gh/VeriFIT/mata/pull/353?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=VeriFIT#diff-c3JjL25mYS9uZmEuY2M=) | `80.09% <88.88%> (-0.25%)` | :arrow_down: |

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

Adda0 commented 1 year ago

It seems to be just a tad bit slower (due to creating the instances of the iterators), but the difference should not be that significant. The experiments will tell.