Skip to content

refactor(pyramid_t): de-duplicate pyramid_t module (#47) - #65

Merged
kalwalt merged 1 commit into
feat/refactor-jsfeat-nextfrom
refactor/47-dedup-pyramid_t
Jul 8, 2026
Merged

refactor(pyramid_t): de-duplicate pyramid_t module (#47)#65
kalwalt merged 1 commit into
feat/refactor-jsfeat-nextfrom
refactor/47-dedup-pyramid_t

Conversation

@kalwalt

@kalwalt kalwalt commented Jul 8, 2026

Copy link
Copy Markdown
Member

Fourth slice of #47 — fresh branch off the integration branch (no stacking, so no squash-merge conflicts this time).

What changed

  • src/pyramid_t/pyramid_t.ts — type-only stub replaced by the real implementation, verbatim from the monolith (allocate, build). One deliberate change: the constructor instantiates imgproc via direct module import instead of the jsfeatNext.imgproc static slot (same class, removes attach-order coupling — same pattern as refactor(imgproc): de-duplicate imgproc module (#47) #63's gaussian_blur).
  • src/jsfeatNext.ts — ~43 lines removed.

Verification

  • tsc --noEmit → clean
  • npm test57/57 (the optical_flow_lk parity test exercises pyramid_t against the original-jsfeat oracle)
  • UMD bundle smoke-checked: instanceof chain, allocate/build produce correct per-level dimensions on a synthetic image
  • dist//types/ untouched (rebuilt when the integration branch merges to dev)

Advances #47. Remaining: linalgorbyape06motion_estimator (+ inline kernels → tightens the any slots in core.ts) → optical_flow_lk.

🤖 Generated with Claude Code

Fourth de-duplication step of #47, following the established pattern.

- src/pyramid_t/pyramid_t.ts: replace the type-only stub with the REAL
  implementation moved verbatim from the monolith (allocate, build). Only
  deliberate change: the constructor instantiates imgproc via direct module
  import instead of the jsfeatNext.imgproc static slot.
- src/jsfeatNext.ts: shrinks by ~43 lines.

Verified behavior-preserving: tsc --noEmit clean; npm test 57/57 (the
optical_flow_lk parity test exercises pyramid_t against the oracle); UMD
bundle smoke-checked (instanceof, allocate/build on a synthetic image with
correct per-level dimensions).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@kalwalt kalwalt added this to the Parity & Modernization milestone Jul 8, 2026
@kalwalt kalwalt self-assigned this Jul 8, 2026
@kalwalt kalwalt added documentation Improvements or additions to documentation enhancement New feature or request Typescript all about Typescript javascript tests labels Jul 8, 2026
@kalwalt
kalwalt merged commit 2017523 into feat/refactor-jsfeat-next Jul 8, 2026
4 checks passed
@kalwalt
kalwalt deleted the refactor/47-dedup-pyramid_t branch July 10, 2026 11:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation enhancement New feature or request javascript tests Typescript all about Typescript

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant