8000 Make VisualIndex::Quantize const to improve readability by IshitaTakeshi · Pull Request #2723 · colmap/colmap · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Make VisualIndex::Quantize const to improve readability #2723

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

Merged
merged 3 commits into from
Aug 20, 2024

Conversation

IshitaTakeshi
Copy link
Contributor

VisualIndex::Quantize is called from only VisualIndex::Build and modifies the member variable visual_words_.

In the current implementation, we cannot easily guess what Quantize actually modifies when reading the Build function.

I made the VisualIndex::Quantize const and made it explicitly return the output.

@IshitaTakeshi IshitaTakeshi changed the title Make VisualIndex::Quantize cost to improve readability Make VisualIndex::Quantize const to improve readability Aug 20, 2024
Copy link
Contributor
@ahojnnes ahojnnes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, this is indeed a nicer interface.

@ahojnnes ahojnnes enabled auto-merge (squash) August 20, 2024 07:33
@ahojnnes
Copy link
Contributor

@IshitaTakeshi You will need to run scripts/format/clang_format.sh for fix the failing CI check. Thanks.

auto-merge was automatically disabled August 20, 2024 12:54

Head branch was pushed to by a user without write access

@ahojnnes ahojnnes enabled auto-merge (squash) August 20, 2024 18:23
@ahojnnes ahojnnes merged commit e9b946a into colmap:main Aug 20, 2024
16 checks passed
@IshitaTakeshi IshitaTakeshi deleted the refactor/quantize-const branch August 21, 2024 05:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0