You are looking at historical revision 32807 of this page. It may differ significantly from its current revision.
Outdated egg!
This is an egg for CHICKEN 3, the unsupported old release. You're almost certainly looking for the CHICKEN 4 version of this egg, if it exists.
If it does not exist, there may be equivalent functionality provided by another egg; have a look at the egg index. Otherwise, please consider porting this egg to the current version of CHICKEN.
matpak
Introduction
matpak is a Scheme library which produces the following functions for matrix/vector manipulation:
- Matrix multiplication
- Matrix inversion
- Inner product of two vectors
- Transpose
- Determinant
The matpak egg is a packaging of the original source code written by Norman Hardy.
Examples
(use matpak) ; matrix transpose (mat-transpose '( (1 2) (3 4) ) ) ==> ((1 3) (2 4)) ; matrix inverse (mat-inverse b cc) ; supply the exit continuation ; matrix multiply (define a '((0 2 4 5) (3 4 5 -2) (7 6 5 3) (4 6 5 7))) (define b (mat-inverse a cc)) (mat-mult a b) ==> ((1 0 0 0) (0 1 0 0) (0 0 1 0) (0 0 0 1)) ; matrix determinant (mat-determinant b) ; vector inner product (mat-inner-product '(2 4) '(5 10)) ==> 50
Authors
matpak was authored entirely by Norm Howard - http://www.cap-lore.com/MathPhys/Field/. It was packaged into an egg by Terrence Brannon
License
BSD
Requirements
Depends on the numbers extension.
Version History
- 1.0 - initial release