Add matrix module: addition, multiplication, transpose, spiral and rotation programs, dry-run traces, operation counts, seeded law checks, six pitfalls (10 tests)
Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_017ic4b4pD5LRLNWAecBNsj9
This commit is contained in:
co-authored by
Claude Sonnet 5.5
parent
26ece9cc9b
commit
35ef0872de
@@ -0,0 +1,12 @@
|
||||
Seeded random checks (seed 2026, 2000 trials each)
|
||||
==================================================
|
||||
|
||||
rotateClockwise == transpose-then-reverse == layer swaps (n x n, n = 1..8): 2000 agree, 0 disagree
|
||||
four clockwise turns return the original: 2000 agree, 0 disagree
|
||||
clockwise then counter-clockwise returns the original: 2000 agree, 0 disagree
|
||||
transpose twice returns the original (random m x n): 2000 agree, 0 disagree
|
||||
(A * B) transposed == B transposed * A transposed: 2000 agree, 0 disagree
|
||||
A * I == A and I * A == A: 2000 agree, 0 disagree
|
||||
i-j-k product == i-k-j product: 2000 agree, 0 disagree
|
||||
A * (B + C) == A * B + A * C: 2000 agree, 0 disagree
|
||||
spiral order is a permutation of all m * n elements: 2000 agree, 0 disagree
|
||||
Reference in New Issue
Block a user