Skip to content

Diag vec#35

Merged
dance858 merged 3 commits intomainfrom
diag-vec
Jan 30, 2026
Merged

Diag vec#35
dance858 merged 3 commits intomainfrom
diag-vec

Conversation

@Transurgeon
Copy link
Collaborator

Adds the diag_vec atom.

Transurgeon and others added 3 commits January 21, 2026 21:53
Implements diag_vec which converts a vector of size n into an n×n diagonal
matrix. Includes forward pass, Jacobian, and Hessian computations.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Use standard CSR building pattern (J->p[row] = nnz)
- Use next_diag counter instead of checking row == child_row * (n+1)
- Simplify eval_jacobian to O(n) loop computing out_row directly

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@dance858 dance858 merged commit ddd38fd into main Jan 30, 2026
0 of 9 checks passed
@dance858 dance858 deleted the diag-vec branch February 1, 2026 23:16
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.

2 participants