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

Use the Visistor pattern for ComplexCombinationIterator to avoid unnecessary creation of objects #15

Open
axkr opened this issue Aug 5, 2015 · 0 comments

Comments

@axkr
Copy link

axkr commented Aug 5, 2015

Suppose you would like to analyze the combinations only until you have found a "match" and then stop the iteration.
Wouldn't it be better to use the Visitor pattern for each generated combination to avoid the creation of all combinations in ComplexCombinationIterator#init() method for the iterator in the _resultSet variable?
See: https://en.wikipedia.org/wiki/Visitor_pattern

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

No branches or pull requests

2 participants