refactor(pyramid_t): de-duplicate pyramid_t module (#47) - #65
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 instantiatesimgprocvia direct module import instead of thejsfeatNext.imgprocstatic slot (same class, removes attach-order coupling — same pattern as refactor(imgproc): de-duplicate imgproc module (#47) #63'sgaussian_blur).src/jsfeatNext.ts— ~43 lines removed.Verification
tsc --noEmit→ cleannpm test→ 57/57 (theoptical_flow_lkparity test exercisespyramid_tagainst the original-jsfeat oracle)instanceofchain,allocate/buildproduce correct per-level dimensions on a synthetic imagedist//types/untouched (rebuilt when the integration branch merges todev)Advances #47. Remaining:
linalg→orb→yape06→motion_estimator(+ inline kernels → tightens theanyslots incore.ts) →optical_flow_lk.🤖 Generated with Claude Code