Skip to content

Comments

Add JSDoc annotations and fix takeOutOfBase column iteration bug#163

Open
JWally wants to merge 2 commits intomasterfrom
docs/jsdoc-annotations
Open

Add JSDoc annotations and fix takeOutOfBase column iteration bug#163
JWally wants to merge 2 commits intomasterfrom
docs/jsdoc-annotations

Conversation

@JWally
Copy link
Owner

@JWally JWally commented Feb 14, 2026

Summary

  • Add comprehensive JSDoc documentation across all 22 source files (types, classes, methods, properties)
  • Fix bug in takeOutOfBase() where column iteration used this.height instead of this.width, causing missed pivot columns when width > height (the common case)

Bug fix details

dynamic-modification.ts:55takeOutOfBase searches for a non-zero coefficient to pivot on by iterating columns, but the loop bound was this.height (number of rows) instead of this.width (number of columns). This truncated the search space on any problem with more variables than constraints.

Performance impact

Metric Before After Change
Total (47 problems) 987 ms 936 ms -5.2%
Vendor Selection (heaviest) 798 ms 695 ms -12.9%

Test plan

  • All 388 unit tests pass
  • All 24 stress tests pass
  • All 47 sanity profile problems produce correct feasibility results
  • Lint, format, typecheck, knip, depcruise all clean

🤖 Generated with Claude Code

JWally and others added 2 commits February 14, 2026 07:22
Add comprehensive JSDoc documentation to all public and internal APIs
including types, classes, methods, and properties across expressions,
model, tableau, simplex, branch-and-cut, and external solver modules.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The takeOutOfBase function searches for a non-zero coefficient to use as
a pivot column, but the loop bound was `this.height` instead of
`this.width`. Since the loop iterates over columns (not rows), this
caused the search to miss valid pivot columns whenever width > height
(more variables than constraints), which is the common case.

~13% improvement on the heaviest benchmark problem (Vendor Selection).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.

1 participant