29 lines
1,000 B
Clojure
29 lines
1,000 B
Clojure
(ns matrix.core
|
|
(:require [clojure.string :as str]
|
|
[matrix.base :refer :all])
|
|
(:require [matrix.interactive :refer :all])
|
|
(:require [matrix.auto :refer :all])
|
|
(:require [matrix.render :refer :all])
|
|
(:gen-class))
|
|
|
|
(defn -main
|
|
"I don't do a whole lot ... yet."
|
|
[& args]
|
|
(let [[steps final] (auto-steps-and-final (read))]
|
|
(println "Steps:")
|
|
;; (for [step steps]
|
|
;; (println (pretty-row-op step)))
|
|
(println (str/join "\n" (map with-inc-row-indices steps)))
|
|
(println "Final:")
|
|
(pprint-matrix final)))
|
|
|
|
; TODO: actual parsing of row operations
|
|
; TODO: parse equations (easy, but requires context (e.g. x = 1 could be any number of variables))
|
|
; TODO: undoing
|
|
; will have to have a higher level thing for storing state
|
|
; use a set for options on the higher-level thing #{:show-equations? :show-bar? :color?}
|
|
; DONE: solving id-matrix
|
|
; DONE: solving gaussian-eliminated matrix
|
|
; DONE: automation
|
|
; DONE: remove redundant row ops
|