Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_017ic4b4pD5LRLNWAecBNsj9
25 lines
399 B
Plaintext
25 lines
399 B
Plaintext
Transpose
|
|
=========
|
|
|
|
2x3 matrix
|
|
[1 2 3]
|
|
[4 5 6]
|
|
transpose() gives a 3x2 matrix
|
|
[1 4]
|
|
[2 5]
|
|
[3 6]
|
|
|
|
3x3 matrix, transposeInPlace()
|
|
[1 2 3]
|
|
[4 5 6]
|
|
[7 8 9]
|
|
becomes
|
|
[1 4 7]
|
|
[2 5 8]
|
|
[3 6 9]
|
|
|
|
isSymmetric([[1,7,3],[7,4,-5],[3,-5,6]]) = true
|
|
isSymmetric([[1,2],[3,4]]) = false
|
|
|
|
transposeInPlace on a 2x3 matrix -> IllegalArgumentException: in-place transpose needs a square matrix but got 2x3
|