summaryrefslogtreecommitdiffstats
path: root/determ.txi
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2017-02-20 00:05:29 -0800
committerBryan Newbold <bnewbold@robocracy.org>2017-02-20 00:05:29 -0800
commit8466d8cfa486fb30d1755c4261b781135083787b (patch)
treec8c12c67246f543c3cc4f64d1c07e003cb1d45ae /determ.txi
parent87b82b5822ca54228cfa6df29be3ad9d4bc47d16 (diff)
downloadslib-8466d8cfa486fb30d1755c4261b781135083787b.tar.gz
slib-8466d8cfa486fb30d1755c4261b781135083787b.zip
Import Upstream version 3a1upstream/3a1
Diffstat (limited to 'determ.txi')
-rw-r--r--determ.txi47
1 files changed, 47 insertions, 0 deletions
diff --git a/determ.txi b/determ.txi
new file mode 100644
index 0000000..30eef3d
--- /dev/null
+++ b/determ.txi
@@ -0,0 +1,47 @@
+@code{(require 'determinant)}
+@ftindex determinant
+
+@noindent
+A Matrix can be either a list of lists (rows) or an array.
+As with linear-algebra texts, this package uses 1-based coordinates.
+
+
+@defun matrix->lists matrix
+
+Returns the list-of-lists form of @var{matrix}.
+@end defun
+
+@defun matrix->array matrix
+
+Returns the (ones-based) array form of @var{matrix}.
+@end defun
+
+@defun determinant matrix
+
+@var{matrix} must be a square matrix.
+@code{determinant} returns the determinant of @var{matrix}.
+
+@example
+(require 'determinant)
+(determinant '((1 2) (3 4))) @result{} -2
+(determinant '((1 2 3) (4 5 6) (7 8 9))) @result{} 0
+@end example
+@end defun
+
+@defun transpose matrix
+
+Returns a copy of @var{matrix} flipped over the diagonal containing the 1,1
+element.
+@end defun
+
+@defun matrix:product m1 m2
+
+Returns the product of matrices @var{m1} and @var{m2}.
+@end defun
+
+@defun matrix:inverse matrix
+
+@var{matrix} must be a square matrix.
+If @var{matrix} is singlar, then @code{matrix:inverse} returns #f; otherwise @code{matrix:inverse} returns the
+@code{matrix:product} inverse of @var{matrix}.
+@end defun