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

Sparse Sequence Iterators constructors with only beg/end arguments #315

Merged
merged 3 commits into from
Sep 2, 2024

Conversation

jgdumas
Copy link
Member

@jgdumas jgdumas commented Jun 24, 2024

Both iterator and indexed iterators now have constructor with only beg/end (on rows)
then subiterator (on columns) is set only if beg != end (that is if matrix is non-empty).

In the whole LinBox library, the above constructor suffices.
When beg != end it initializes to beg->begin(); but the latter was ill-defined otherwise, causing some instability.

If needed, it is simple enough to reintroduce the 3 arguments constructor,
for when it is known in advance that beg != end, and when the third argument is different from "beg->begin()" ...

@jgdumas
Copy link
Member Author

jgdumas commented Jun 24, 2024

Also correcting the '==' and '!=' operators for these iterators:
test subiterator only if rows are non-empty

@jgdumas jgdumas merged commit 62bea86 into master Sep 2, 2024
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

Successfully merging this pull request may close these issues.

1 participant