From b8bbd083214bbf3ba0704663242ef1afa92461bf Mon Sep 17 00:00:00 2001 From: cj12154 Date: Fri, 13 Jan 2023 14:07:38 -0500 Subject: [PATCH] add an actual usage example from the homework --- README.md | 72 +++++++++++++++++++ .../maven/matrix/matrix/pom.properties | 4 +- target/default/repl-port | 1 + 3 files changed, 75 insertions(+), 2 deletions(-) create mode 100644 target/default/repl-port diff --git a/README.md b/README.md index 258f7a6..45ea118 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,75 @@ 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 ┃ +┗ ┛ diff --git a/target/default/classes/META-INF/maven/matrix/matrix/pom.properties b/target/default/classes/META-INF/maven/matrix/matrix/pom.properties index 29ccf6f..0c7f5a0 100644 --- a/target/default/classes/META-INF/maven/matrix/matrix/pom.properties +++ b/target/default/classes/META-INF/maven/matrix/matrix/pom.properties @@ -1,6 +1,6 @@ #Leiningen -#Fri Jan 13 12:10:35 EST 2023 +#Fri Jan 13 13:52:07 EST 2023 groupId=matrix artifactId=matrix version=0.1.0-SNAPSHOT -revision=29fca794b5d88671a902cff6c2cf4aef643fca23 +revision=7c4f04564094ed1bddc776c0f1e4725cadfbd3cc diff --git a/target/default/repl-port b/target/default/repl-port new file mode 100644 index 0000000..e45d98a --- /dev/null +++ b/target/default/repl-port @@ -0,0 +1 @@ +37245 \ No newline at end of file