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

core: replace RedBlackMap and RedBlackSet implementation with standard containers #520

Open
mkviatkovskii opened this issue Nov 11, 2021 · 0 comments

Comments

@mkviatkovskii
Copy link
Member

Motivation
Currently Indigo uses own-written implementation of ordered associative containers and ordered sets using red-black trees. The implementation could be found in core/indigo-core/common/base_cpp/red_black.h.
In many cases order of elements is not important and int is a key type, so it could be easily replaced with hash maps and also lead to performance improvement. Same for unordered sets.

ToDo

  1. Find all places in code that use RedBlackMap<K, V>, check if K is trivially hashable and order of elements is required, and replace it with std::map<K, V> or std::unordered_map<K, V> depending on the situation.
  2. Find all places in code that use RedBlackSet<K>, check if K is trivially hashable and order of elements is required, and replace it with std::set<K> or std::unordered_set<K> depending on the situation.
  3. Check if core/indigo-core/common/base_cpp/red_black.h and eliminate it if it's not required anymore.
@mkviatkovskii mkviatkovskii added this to the indigo-1.6 milestone Nov 11, 2021
@mkviatkovskii mkviatkovskii changed the title core: replace own maps and sets implementation with std core: replace RedBlackMap and RedBlackSet implementation with standard containers Nov 11, 2021
@khyurri khyurri self-assigned this Nov 12, 2021
@khyurri khyurri removed their assignment Nov 22, 2021
@AMazhyrau AMazhyrau self-assigned this Feb 21, 2022
AStepaniuk pushed a commit that referenced this issue Aug 1, 2022
…with standard containers

IndigoDeconvolution class is updated.
AStepaniuk pushed a commit that referenced this issue Aug 1, 2022
…with standard containers

Fix clang-formatter issue
AStepaniuk pushed a commit that referenced this issue Aug 2, 2022
…with standard containers

Partial implementation: BingoContext and MoleculeMass are updated
AStepaniuk pushed a commit that referenced this issue Aug 2, 2022
…with standard containers

Fix clang_format
AStepaniuk pushed a commit that referenced this issue Aug 2, 2022
Partial implementation: GraphEmbeddingsStorage class update
AStepaniuk pushed a commit that referenced this issue Aug 2, 2022
…with standard containers

Removed internal usage of RedBlackMap from IndigoDeconvolution.
AStepaniuk pushed a commit that referenced this issue Aug 2, 2022
Partial implementation: Removed RedBlackMap from SimpleCycleBasis
AStepaniuk pushed a commit that referenced this issue Aug 3, 2022
Partial implementation: MangoPg is updated
loimu pushed a commit that referenced this issue Aug 3, 2022
loimu pushed a commit that referenced this issue Aug 4, 2022
Partial implementation: replace RedBlackMap in BaseMolecule class
loimu pushed a commit that referenced this issue Aug 4, 2022
Partial implementation: replace RedBlackMap in MoleculeRGroupsComposition class
loimu pushed a commit that referenced this issue Aug 4, 2022
Partial implementation: replace RedBlackMap in MoleculeGrossFormula class
loimu pushed a commit that referenced this issue Aug 4, 2022
Partial implementation: replace RedBlackMap in MoleculeGrossFormula class
loimu pushed a commit that referenced this issue Aug 4, 2022
Partial implementation: replace RedBlackMap in MoleculeGrossFormula class
loimu pushed a commit that referenced this issue Aug 4, 2022
Partial implementation: replace RedBlackMap in MoleculeCdxLoader class
AStepaniuk pushed a commit that referenced this issue Aug 4, 2022
…with standard containers

Partial implementation: fix for MoleculeAlleneStereo
loimu pushed a commit that referenced this issue Aug 5, 2022
Partial implementation: replace RedBlackMap in MolfileSaver class
loimu pushed a commit that referenced this issue Aug 5, 2022
Partial implementation: replace RedBlackMap in BaseReactionSubstructureMatcher class
mkviatkovskii pushed a commit that referenced this issue Aug 7, 2022
* Issue #520: core: replace RedBlackMap and RedBlackSet implementation with standard containers
IndigoDeconvolution class is updated.

* Issue #520: core: replace RedBlackMap and RedBlackSet implementation with standard containers
Fix clang-formatter issue

* Issue #520: core: replace RedBlackMap and RedBlackSet implementation with standard containers
Removed internal usage of RedBlackMap from IndigoDeconvolution.

Co-authored-by: Alexander Stepaniuk <AStepanjuk@gmail.com>
Co-authored-by: Aliaksander Stsepaniuk <Aliaksander_Stsepaniuk@epam.com>
MysterionRise added a commit that referenced this issue Oct 13, 2022
Issue #520: core: replace RedBlackMap and RedBlackSet implementation
MysterionRise added a commit that referenced this issue Oct 13, 2022
Issue #520: core: replace RedBlackMap for GraphEmbeddingsStorage
MysterionRise added a commit that referenced this issue Oct 13, 2022
Issue #520: core: replace RedBlackMap in SimpleCycleBasis
MysterionRise added a commit that referenced this issue Oct 13, 2022
Issue #520: core: replace RedBlackMap for MangoPg
MysterionRise added a commit that referenced this issue Oct 13, 2022
…s_composition

Issue #520: core: replace RedBlackMap in MoleculeRGroupsComposition class
MysterionRise added a commit that referenced this issue Oct 13, 2022
…s_saver

Issue #520: core: replace RedBlackMap in CanonicalSmilesSaver
MysterionRise added a commit that referenced this issue Oct 13, 2022
Issue #520: core: replace RedBlackMap in BaseMolecule class
MysterionRise added a commit that referenced this issue Oct 13, 2022
…straints

Issue #520: core: replace RedBlackMap for Molecule3dConstraints
MysterionRise added a commit that referenced this issue Oct 13, 2022
…formula

Issue #520: core: replace RedBlackMap in MoleculeGrossFormula class
MysterionRise added a commit that referenced this issue Oct 13, 2022
…ader

Issue #520: core: replace RedBlackMap in MultipleCdxLoader class
MysterionRise added a commit that referenced this issue Oct 13, 2022
Issue #520: core: replace RedBlackMap  in MolfileSaver class
MysterionRise added a commit that referenced this issue Oct 13, 2022
…ubstructure_matcher

Issue #520: core: replace RedBlackMap in BaseReactionSubstructureMatcher class
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

4 participants