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

Is this crate designed to solve a problem of I/O combination sets? #5

Open
zbraniecki opened this issue Nov 5, 2020 · 1 comment
Open

Comments

@zbraniecki
Copy link

I have the following scenario:

  • Two sources (imagine, directories) - (S1, S2)
  • List of files (resources) - (R1, R2, R3)
  • The code is synchronous, so testing of partial solutions happens sequentially
  • I am building an iterator that is mean to return a list of solutions to the problem like this:
    • [S1xR1, S1xR2, S1xR3]
    • [S1xR1, S1xR2, S2xR3]
    • [S1xR1, S2xR2, S2xR3]
    • [S2xR1, S2xR2, S2xR3]
    • [S2xR1, S1xR2, S2xR3]
    • [S2xR1, S1xR2, S1xR3]
    • [S1xR1, S2xR2, S1xR3]
    • [S2xR1, S2xR2, S1xR3]

It's not very important for me which order the fallbacks come in.

What I do care is about backtracking/pruning of failure branches. If S2xR2 returns false, it should break any attempt at constructing any combination with that branch.

Does this crate solve such problem? Can I get pointed at any examples?

@bvssvni
Copy link
Collaborator

bvssvni commented Nov 8, 2020

This is an interesting use case.

Perhaps we could implement (U, T) : Puzzle where U : Puzzle and T : Puzzle?

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