kangwonlee / kangwonlee/nmisp

Pedagogy: unify 60_linear_algebra_2 elimination sliders (shared hinton_step_slider; add to 100 + 125)

Open
#445 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Jupyter Notebook
Stars
12
Forks
76
PR merge metrics
No merged PRs in 30d

Description

## Context

The `60_linear_algebra_2` chapter now has Hinton step-sliders in several elimination / iteration notebooks, but they are built two different ways:

- **`150` (Inverse matrix / Gauss–Jordan)** uses the shared helper `matshow.hinton_step_slider`, which computes **one `common_max_weight` across all frames** (box sizes are comparable step-to-step — you can watch a pivot shrink), is **CI-guarded** (renders the final frame headless, interactive in Colab), and accepts a `titles=` argument. Used at 3×3 / 4×4 / 7×7.
- **`102` (Gauss elimination, n×n)** has a **bespoke inline slider** (`gauss_elimination_steps(...)` → `ipywidgets.interact`/`IntSlider`) with nice per-step **titles**, but each frame calls a local `hinton(matrix)` with **no fixed scale**, so **every frame rescales independently** — a box of a given size can mean different magnitudes from step to step.

## Proposed

1. **Unify `102` onto `matshow.hinton_step_slider`.** Keep the per-step titles (the helper takes `titles=`), gain the shared scale (cross-step comparability — the whole point of the slider), and drop the duplicated bespoke code + the local `hinton` definition.
- `102` currently defines its own local `hinton`; switching to the helper means `import matshow`, so confirm `102` has the Colab clone cell that clones `kwlee2025cpp/nmisp_py` (cf. #442). `150` already has it.

2. **Add the slider to notebooks that lack one:**
- **`100` (Systems of Linear Equations)** — has `hinton()` but no slider.
- **`125` (Five-Node Truss)** — no Hinton / slider at all.
- Both walk through an elimination/solve that a per-step scrubber would make clearer.

## Done =

- Where a `gauss_*` helper supports it, collect frames via a `snapshots=` list (as in `150`); otherwise retain per-step matrices in the existing loop.
- Drive `matshow.hinton_step_slider(snapshots, titles=...)`; keep the CI guard (already in the helper).
- Verify headless (`CI=true jupyter nbconvert --execute`); introduce no new Colab-clone gaps (#442).
- Concept-name cross-references only (renumber-proof).

Parked from the 2026-06-01 session (sliders were just added to `150` 4×4/7×7 in #444); building deferred.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.