@@ -32,54 +32,40 @@ in `docs/book/` and papers in `docs/papers/`.
3232
3333** Changes** : Added ` fp_rotate_row ` subroutine; replaced 1 occurrence in ` fpcurf `
3434
35- ---
35+ ### PR 4: Complete Variant A Givens Rotations (DONE)
3636
37- ## Remaining Plan
37+ ** Changes** : Replaced all ~ 15 scalar-RHS rotation patterns with ` fp_rotate_row `
38+ in ` fpcurf ` , ` fpcons ` , ` fppara ` , ` fprank `
3839
39- Each item below is a separate PR. PRs are ordered by dependency; documentation (PR 8) can
40- proceed in parallel with any code PR.
40+ ### PR 5: Variant B Standard Givens Rotations (DONE)
4141
42- ### PR 4: Complete Variant A Givens Rotations
43-
44- ** Scope** : Replace all scalar-RHS rotation patterns with ` fp_rotate_row `
45- ** Occurrences** : ~ 15 locations in ` fpcurf ` , ` fpcons ` , ` fppara ` , ` fprank `
46- ** Difficulty** : Low — mechanical replacement, same signature as existing helper
47- ** Variant pattern** :
48- ``` fortran
49- do i=1,k1
50- j = j+1
51- piv = h(i); if (equal(piv,zero)) cycle
52- call fpgivs(piv,a(j,1),cos,sin)
53- call fprota(cos,sin,yi,z(j))
54- if (i<k1) call fprota(cos,sin,h(i+1:k1),a(j,2:k1-i+1))
55- end do
56- ```
57- ** See** : [ 01_qr_row_rotation_refactor.md] ( 01_qr_row_rotation_refactor.md ) , Variant A
42+ ** Changes** : Added ` fp_rotate_row_vec ` subroutine for vector-RHS rotations
43+ with explicit-shape arrays ` h(band) ` , ` a(nest,*) ` , ` xi(idim) ` , ` z(n,idim) ` .
44+ Replaced 3 standard Variant B call sites in ` fpclos ` , ` fpcons ` , ` fppara ` .
45+ Removed unused variables ` i1 ` , ` i3 ` from ` fpcons ` and ` fppara ` .
5846
5947---
6048
61- ### PR 5: Reshape Array Indexing in ` fpcurf `
49+ ## Remaining Plan
6250
63- ** Scope** : Clean up 1D array stride patterns in the main curve fitting routine
64- ** Goal** : Make band matrix access and multi-dimensional RHS indexing explicit,
65- preparing the ground for cleaner Variant B/C/D rotation replacements
66- ** Difficulty** : Medium — requires careful index verification
67- ** Key patterns to address** :
68- - Strided RHS access: ` z(j:j+(idim-1)*n:n) ` → clearer views
69- - Any remaining manual offset arithmetic for band matrix columns
51+ Each item below is a separate PR. PRs are ordered by dependency; documentation (PR 9) can
52+ proceed in parallel with any code PR.
7053
71- ** Book references** : Ch. 4 Fig. 4.2 (band structure of E and R₁),
72- Ch. 5 Fig. 5.1 (band structure of P and R₁* )
54+ ### PR 6: Variant B/C Shifting-Pivot Givens Rotations
7355
74- ---
56+ ** Scope** : Shifting-pivot and two-matrix periodic rotation variants
57+ ** New routines** : ` fp_rotate_row_2mat ` (two-matrix rotation for periodic splines),
58+ possibly ` fp_rotate_shifted_vec ` (single-matrix with pivot shift)
59+ ** Remaining occurrences** (4 sites, all use shifting-pivot pattern ` h(1:n) = [h(2:n), zero] ` ):
7560
76- ### PR 6: Variant B/C Givens Rotations
61+ | Site | Routine | Pattern | Notes |
62+ | ------| ---------| ---------| -------|
63+ | 1 | fpclos | two-matrix (a1,a2) + shift + vec z | Variant C |
64+ | 2 | fpclos | two-matrix (g1,g2) + shift + vec c | Variant C |
65+ | 3 | fpcons | single-matrix (g) + shift + vec c | could use ` fp_rotate_shifted_vec ` |
66+ | 4 | fppara | single-matrix (g) + shift + vec c | could use ` fp_rotate_shifted_vec ` |
7767
78- ** Scope** : Vector RHS and two-matrix periodic variants
79- ** New routines** : ` fp_rotate_row_vec ` (vector RHS with stride),
80- ` fp_rotate_row_2mat ` (two-matrix rotation for periodic splines)
81- ** Occurrences** : ~ 15 locations in ` fpclos ` , ` fpcons ` , ` fppara ` , ` fpperi `
82- ** Difficulty** : Medium — strided access and secondary matrix add complexity
68+ ** Difficulty** : Medium — shifting pivot and secondary matrix add complexity
8369** See** : [ 01_qr_row_rotation_refactor.md] ( 01_qr_row_rotation_refactor.md ) , Variants B & C
8470
8571---
0 commit comments