Skip to content

Operations.hs & Operators.hs vs. Matrix.hs

Jacob edited this page Oct 18, 2016 · 6 revisions

Operations.hs and Operators.hs exclusively use ListMatrix a type synonym for [[a]] (exported by Util.hs), whereas Matrix.hs adds the Matrix datatype and uses it exclusively. Matrix is implemented using LinkedList Row (where Row is a type synonym for LinkedList Double and LinkedList is a data structure from LinkedList.hs), and is safer, requires less boilerplate to use, but has more boilerplate to create. ListMatrix a is less safe, requires more boilerplate to use, but is quick and easy to create. Thus it is suggested to use ListMatrix a for experimentation and short-term projects/code. Matrix should be preferred for long-term projects/code and bigger or more complex problems.

Clone this wiki locally