Skip to content

feat(kpm): facade-parity accessors on VisualDatabase + FeatureStore slices (#148)#216

Merged
kalwalt merged 1 commit into
devfrom
feat/kpm-facade-accessors-148
Jun 24, 2026
Merged

feat(kpm): facade-parity accessors on VisualDatabase + FeatureStore slices (#148)#216
kalwalt merged 1 commit into
devfrom
feat/kpm-facade-accessors-148

Conversation

@kalwalt

@kalwalt kalwalt commented Jun 23, 2026

Copy link
Copy Markdown
Member

Summary

Adds the VisualDatabaseFacade Group-A convenience accessors to the Rust port so it's a drop-in for the C++ facade surface, plus the FeatureStore slice accessors they build on. Pure additive getters — no behavior change, no algorithmic risk.

Closes #148. (v0.8.0 milestone close-out, 1/4.)

Changes

  • FeatureStore (matcher.rs): points() -> &[FeaturePoint], descriptors() -> &[u8] — slice counterparts to the per-element point(i)/descriptor(i), so callers stop iterating 0..num_features().
  • VisualDatabase (visual_database.rs): get_feature_points(id), get_descriptors(id), get_query_feature_points(), get_query_descriptors(), get_width(id), get_height(id)Option-returning 1-liners over the slice accessors (idiomatic vs the C++ raw returns).
  • Tests for both (deterministic, no image pipeline).

Out of scope (per #148)

  • Group B (get3DFeaturePoints — NFT 3D state, lives on RustFreakMatcher).
  • Group C (computeFreakFeaturesAndDescriptors — no current caller).

Verification

  • cargo clippy --all-targets --all-features -- -D warnings clean
  • cargo test --all-features green (2 new tests)

🤖 Generated with Claude Code

…atureStore slices (#148)

Mirror `VisualDatabaseFacade`'s Group-A accessors so the Rust port is a
drop-in for the C++ facade surface, and callers don't have to loop
`0..num_features()` element-by-element. Pure additive getters — no behavior
change.

- `FeatureStore`: add slice accessors `points() -> &[FeaturePoint]` and
  `descriptors() -> &[u8]` (counterparts to per-element `point(i)`/`descriptor(i)`).
- `VisualDatabase`: add `get_feature_points(id)`, `get_descriptors(id)`,
  `get_query_feature_points()`, `get_query_descriptors()`, `get_width(id)`,
  `get_height(id)` (Option-returning, 1-liners over the slice accessors).
- Tests for both (deterministic, no image pipeline).

Group B (3D feature points — RustFreakMatcher/NFT domain) and Group C
(computeFreakFeaturesAndDescriptors — no caller) are out of scope.

Refs #148.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@codecov

codecov Bot commented Jun 23, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@kalwalt kalwalt self-assigned this Jun 23, 2026
@kalwalt kalwalt moved this from Backlog to In progress in Plan to port KPM to rust Jun 23, 2026
@kalwalt kalwalt moved this from In progress to In review in Plan to port KPM to rust Jun 24, 2026
@kalwalt kalwalt merged commit 03fd9d7 into dev Jun 24, 2026
21 checks passed
@github-project-automation github-project-automation Bot moved this from In review to Done in Plan to port KPM to rust Jun 24, 2026
@kalwalt kalwalt deleted the feat/kpm-facade-accessors-148 branch June 28, 2026 17:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant