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

list_orthants should return an iterator #76

Closed
lucaferranti opened this issue Aug 19, 2021 · 0 comments · Fixed by #79
Closed

list_orthants should return an iterator #76

lucaferranti opened this issue Aug 19, 2021 · 0 comments · Fixed by #79
Labels
enhancement New feature or request

Comments

@lucaferranti
Copy link
Member

lucaferranti commented Aug 19, 2021

Feature description

The function list_orthants at the moment returns a vector of vectors and hence allocates and it's not very efficient. It should return an iterator, similar to what DiagDirection in LazySets.jl does (cc @mforets ). Since LazySets.jl is an optional dependency used only in LinearOettliPrager, it would be good to have a more efficient version of list_orthants in IntervalLinearAlgebra.jl

Minimum working example

I'm not sure what would be a smart way to go, maybe define

struct Orthants
n::Int
end

and implement the iterators interface for that

Additional information

@lucaferranti lucaferranti added the enhancement New feature or request label Aug 19, 2021
This was referenced Aug 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant