Skip to content

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

Description

@kwlee2025cpp

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.

  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 =

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions