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

Remove IdFragmentAndAP #66

Open
marco-foscato opened this issue Apr 11, 2022 · 1 comment
Open

Remove IdFragmentAndAP #66

marco-foscato opened this issue Apr 11, 2022 · 1 comment
Labels
Refactoring Fix typos, clean up code, change design

Comments

@marco-foscato
Copy link
Member

The IdFragmentAndAP class made sense when denoptim used an index-based approach for identifying building blocks and attachment points.
It should be possible to remove it and replace the related index-based code with reference-based one.

@marco-foscato marco-foscato added the Refactoring Fix typos, clean up code, change design label Apr 11, 2022
@marco-foscato
Copy link
Member Author

The presence of IdFragmentAndAP in the FragSpaceExplorer, namely here, prevents the change of the library of fragments in a hypothetical process where graphs are build by a sequence of constrained FSE acting on the compatibility matrix and on the presence of fragments in the fragment's library. In practice, if we build root graphs with lib_frags-version-A that contains a vertex with ID=50 that have 4 APs, then that vertex must be in the same position in any further use of FSE on that root graph, for instane a further enrichment using lib_frags-version-B. In practice any change to the library of vertexes must not affect the previously used vertexes. Failure in adhering to this contract, i.e., failure in retaining at position 50 of any lib_frags-version-B/C/d/... the 4-AP vertex will eventually result lead to java.lang.IndexOutOfBoundsException (from here) at ID 50 now we have a vertex with N<4 attachment points.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Refactoring Fix typos, clean up code, change design
Projects
None yet
Development

No branches or pull requests

1 participant