update readme to show awesome spacing

This commit is contained in:
mehbark 2023-05-11 10:39:15 -04:00
parent c3509f74bd
commit 46be23055c
5 changed files with 73 additions and 19 deletions

0
.lein-repl-history Normal file
View file

View file

@ -1,22 +1,68 @@
current version's usage example (only the first line is user-input): current version's usage example (only the first line is user-input):
``` ```
[[3 1 1 2] [1 -2 1 4] [-1 1 0 4]] User input: [[3 1 1 2] [1 -2 1 4] [-1 1 0 4]]
Steps:
1/3R₁
-1R₁ + R₂
R₁ + R₃
-3/7R₂
-4/3R₂ + R₃
7/5R₃
-1/3R₃ + R₁
2/7R₃ + R₂
-1/3R₂ + R₁
Final:
┏ ┓ ┏ ┓
1 0 0 -14/5 ┃ 3 1 1 │ 2 ┃
0 1 0 6/5 ┃ 1 -2 1 │ 4 ┃
0 0 1 46/5 ┃ -1 1 0 │ 4 ┃
┗ ┛ ┗ ┛
1/3R₀
┏ ┓
┃ 1 1/3 1/3 │ 2/3 ┃
┃ 1 -2 1 │ 4 ┃
┃ -1 1 0 │ 4 ┃
┗ ┛
-1R₀ + R₁
┏ ┓
┃ 1 1/3 1/3 │ 2/3 ┃
┃ 0 -7/3 2/3 │ 10/3 ┃
┃ -1 1 0 │ 4 ┃
┗ ┛
R₀ + R₂
┏ ┓
┃ 1 1/3 1/3 │ 2/3 ┃
┃ 0 -7/3 2/3 │ 10/3 ┃
┃ 0 4/3 1/3 │ 14/3 ┃
┗ ┛
-3/7R₁
┏ ┓
┃ 1 1/3 1/3 │ 2/3 ┃
┃ 0 1 -2/7 │ -10/7 ┃
┃ 0 4/3 1/3 │ 14/3 ┃
┗ ┛
-4/3R₁ + R₂
┏ ┓
┃ 1 1/3 1/3 │ 2/3 ┃
┃ 0 1 -2/7 │ -10/7 ┃
┃ 0 0 5/7 │ 46/7 ┃
┗ ┛
7/5R₂
┏ ┓
┃ 1 1/3 1/3 │ 2/3 ┃
┃ 0 1 -2/7 │ -10/7 ┃
┃ 0 0 1 │ 46/5 ┃
┗ ┛
-1/3R₂ + R₀
┏ ┓
┃ 1 1/3 0 │ -12/5 ┃
┃ 0 1 -2/7 │ -10/7 ┃
┃ 0 0 1 │ 46/5 ┃
┗ ┛
2/7R₂ + R₁
┏ ┓
┃ 1 1/3 0 │ -12/5 ┃
┃ 0 1 0 │ 6/5 ┃
┃ 0 0 1 │ 46/5 ┃
┗ ┛
-1/3R₁ + R₀
┏ ┓
┃ 1 0 0 │ -14/5 ┃
┃ 0 1 0 │ 6/5 ┃
┃ 0 0 1 │ 46/5 ┃
┗ ┛
x = -14/5
y = 6/5
z = 46/5
``` ```
OLD \*actual\* usage example: OLD \*actual\* usage example:

View file

@ -28,12 +28,13 @@
(#(interleave % (map pretty-row-op steps))) (#(interleave % (map pretty-row-op steps)))
(#(concat % [(pretty-matrix final true)])) (#(concat % [(pretty-matrix final true)]))
(str/join "\n") (str/join "\n")
println))) println)
(println (equations final))))
(defn -main (defn -main
"I don't do a whole lot ... yet." "I don't do a whole lot ... yet."
[& args] [& args]
(steps-final-equations-interactive)) (steps-with-matrices))
; TODO: actual parsing of row operations ; TODO: actual parsing of row operations
; TODO: parse equations (easy, but requires context (e.g. x = 1 could be any number of variables)) ; TODO: parse equations (easy, but requires context (e.g. x = 1 could be any number of variables))

View file

@ -0,0 +1,6 @@
#Leiningen
#Thu May 11 10:38:22 EDT 2023
groupId=matrix
artifactId=matrix
version=0.1.0-SNAPSHOT
revision=c3509f74bdef01c3d631489b424bb096e5dd0d0c

View file

@ -0,0 +1 @@
[{:dependencies {org.clojure/clojure {:vsn "1.11.1", :native-prefix nil}, org.clojure/spec.alpha {:vsn "0.3.218", :native-prefix nil}, org.clojure/core.specs.alpha {:vsn "0.2.62", :native-prefix nil}, nrepl {:vsn "0.6.0", :native-prefix nil}, clojure-complete {:vsn "0.2.5", :native-prefix nil}}, :native-path "target/default/native"} {:native-path "target/default/native", :dependencies {org.clojure/clojure {:vsn "1.11.1", :native-prefix nil, :native? false}, org.clojure/spec.alpha {:vsn "0.3.218", :native-prefix nil, :native? false}, org.clojure/core.specs.alpha {:vsn "0.2.62", :native-prefix nil, :native? false}, nrepl {:vsn "0.6.0", :native-prefix nil, :native? false}, clojure-complete {:vsn "0.2.5", :native-prefix nil, :native? false}}}]