No description
Find a file
2023-01-15 20:31:36 -05:00
doc initial 2023-01-12 19:52:02 -05:00
src/matrix add human-readable indices (starting at 1) 2023-01-15 20:31:36 -05:00
test/matrix automation basically done 2023-01-15 20:21:25 -05:00
CHANGELOG.md initial 2023-01-12 19:52:02 -05:00
LICENSE initial 2023-01-12 19:52:02 -05:00
project.clj initial 2023-01-12 19:52:02 -05:00
README.md add an actual usage example from the homework 2023-01-13 14:07:38 -05:00

clojure matrix-repl thing, the last two methods in src/matrix/core.clj are the only interesting bits

src/matrix/core.clj is the only file with interesting stuff

*actual* usage example:

matrix.core=> (matrix-repl [[1 1 -1 -5] [5 -1 1 -1] [-1 3 -2 1]] :yeah)
┏               ┓
┃  1  1 -1 │ -5 ┃
┃  5 -1  1 │ -1 ┃
┃ -1  3 -2 │  1 ┃
┗               ┛
(add-mul 5 2 1)
┏               ┓
┃  1  1 -1 │ -5 ┃
┃  0 14 -9 │  4 ┃
┃ -1  3 -2 │  1 ┃
┗               ┛
(add 0 2)
┏               ┓
┃  1  1 -1 │ -5 ┃
┃  0 14 -9 │  4 ┃
┃  0  4 -3 │ -4 ┃
┗               ┛
(add-mul -4/14 1 2)
┏                           ┓
┃     1     1    -1 │    -5 ┃
┃     0    14    -9 │     4 ┃
┃     0     0  -3/7 │ -36/7 ┃
┗                           ┛
(mul 7 2)
┏                   ┓
┃   1   1  -1 │  -5 ┃
┃   0  14  -9 │   4 ┃
┃   0   0  -3 │ -36 ┃
┗                   ┛
(mul -1/3 2)
┏               ┓
┃  1  1 -1 │ -5 ┃
┃  0 14 -9 │  4 ┃
┃  0  0  1 │ 12 ┃
┗               ┛
(add-mul 9 2 1)
┏                   ┓
┃   1   1  -1 │  -5 ┃
┃   0  14   0 │ 112 ┃
┃   0   0   1 │  12 ┃
┗                   ┛
(mul 1/14 1)
┏               ┓
┃  1  1 -1 │ -5 ┃
┃  0  1  0 │  8 ┃
┃  0  0  1 │ 12 ┃
┗               ┛
(add 2 0)
┏               ┓
┃  1  1  0 │  7 ┃
┃  0  1  0 │  8 ┃
┃  0  0  1 │ 12 ┃
┗               ┛
(add-mul -1 1 0)
┏               ┓
┃  1  0  0 │ -1 ┃
┃  0  1  0 │  8 ┃
┃  0  0  1 │ 12 ┃
┗               ┛
print-equations
x = -1
y = 8
z = 12
┏               ┓
┃  1  0  0 │ -1 ┃
┃  0  1  0 │  8 ┃
┃  0  0  1 │ 12 ┃
┗               ┛