diff options
author | j-james | 2022-11-15 08:24:05 +0000 |
---|---|---|
committer | j-james | 2022-11-15 08:24:05 +0000 |
commit | ab451b3466b7f5151db9556fdf326934f86bd246 (patch) | |
tree | d8cdd9c49bc11cc05110e20b787ceb9cde997962 /lalge/README.md | |
parent | ef73dc1db2f0389912e442b0f6cd5fa6712d4026 (diff) |
Add my linear algebra library
Diffstat (limited to 'lalge/README.md')
-rw-r--r-- | lalge/README.md | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/lalge/README.md b/lalge/README.md new file mode 100644 index 0000000..640654d --- /dev/null +++ b/lalge/README.md @@ -0,0 +1,46 @@ +# lalge (name tbd) + +A functional, dead simple linear algebra library written in Nim. Mostly for learning purposes. + +This is also serving as my finals review, haha. + +If you're looking for an actually robust linear algebra library for Nim, check out [Neo](https://github.com/andreaferretti/neo). + +## What's this language? + +Nim is a compiled whitespace-sensitive systems language with a strong type system and interesting memory management capabilities. + +It doesn't quite beat Python's usability or Rust's features, but I like it quite a lot, and think it's a good complement to other languages I use. + +Nim's [UFCS](https://en.wikipedia.org/wiki/Uniform_Function_Call_Syntax) (TL;DR: `a.add(b) == add(a, b)`) and operator overloading support is also a major draw for this type of project. + +## Architecture + +lalge uses Nim's `seqs` - dynamic arrays, equivalent to Rust's `Vec`, Go's `slice`, or Java's `ArrayList` - to implement matrices. This may have some performance overhead. On the other hand, it has the benefit of making the code much simpler. + +This also has the benefit of being able to declare matrices as such: +```nim +example: Matrix = @[ + @[1, 0, 0], + @[0, 1, 0], + @[0, 0, 1], +] +``` + +## Goals +- [ ] Cover the basic operations associated with the MATH 221 / typical introductory linear algebra curriculum + - [x] Addition / Subtraction + - [x] (Scalar / Vector) Multiplication + - [x] Inverse + - [x] Transpose + - [ ] Eigenvalues / Eigenvectors + - [ ] everything that i am forgetting +- [ ] Helpful characteristic functions + - [ ] Dimension + - [ ] Rank / Nullity + - [ ] Spans + - [ ] Determinant +- [x] Support arbitrary-sized matrices with internal seq representation +- [x] Support specialized "vectors", as opposed to Nx1 matrices + +After I get to a reasonable point of completeness, I'd love to go through and compare my library to Eigen (generally praised as a Very Good library) |