When removing a molecule from a cluster or adding a molecule to an existing cluster, the clb-atoms lookup is updated in the helper function responsible for the change. For consistency, I've moved the lookup update to the helper function for creating a new cluster for a molecule.
Description
Moved code that resizes the lookup and adds all molecule atoms to the entry for the new cluster from the top level api function in re_cluster.cpp to the utility function in re_cluster_util.cpp.
Related Issue
Motivation and Context
In the legalizer, it is confusing to sometimes have to update this data structure and sometimes not; always doing it in the helper function is more clear. It does not change the functionality of the re-clustering API.
How Has This Been Tested?
Types of changes
[ ] Bug fix (change which fixes an issue)
[ ] New feature (change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to change)
Checklist:
[ ] My change requires a change to the documentation
When removing a molecule from a cluster or adding a molecule to an existing cluster, the clb-atoms lookup is updated in the helper function responsible for the change. For consistency, I've moved the lookup update to the helper function for creating a new cluster for a molecule.
Description
Moved code that resizes the lookup and adds all molecule atoms to the entry for the new cluster from the top level api function in re_cluster.cpp to the utility function in re_cluster_util.cpp.
Related Issue
Motivation and Context
In the legalizer, it is confusing to sometimes have to update this data structure and sometimes not; always doing it in the helper function is more clear. It does not change the functionality of the re-clustering API.
How Has This Been Tested?
Types of changes
Checklist: