Skip to content

Commit 136d1a6

Browse files
committed
0.4 release
1 parent edfd84f commit 136d1a6

File tree

5 files changed

+43
-39
lines changed

5 files changed

+43
-39
lines changed

Makefile

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,12 @@
11
# matrico Makefile
22

3-
#CSC = CHICKEN_REPOSITORY_PATH="/home/ch/opt/CHICKEN/lib/chicken/11/" /home/ch/opt/CHICKEN/bin/csc
4-
#CSI = CHICKEN_REPOSITORY_PATH="/home/ch/opt/CHICKEN/lib/chicken/11/" /home/ch/opt/CHICKEN/bin/csi
5-
#CHICKEN_INSTALL = /home/ch/opt/CHICKEN/bin/chicken-install
6-
#CHICKEN_PROFILE =/home/ch/opt/CHICKEN/bin/chicken-profile
7-
#TEST_NEW_EGG = /home/ch/opt/CHICKEN/bin/test-new-egg
8-
9-
TAR = tar
10-
SED = sed
3+
TAR = tar # homebrew: gtar
4+
SED = sed # homebrew: gsed
115
CSC = csc
126
CSI = csi
137
CHICKEN_INSTALL = chicken-install
148
CHICKEN_PROFILE = chicken-profile
15-
TEST_NEW_EGG = test-new-egg
16-
17-
TAR = gtar
18-
SED = gsed
19-
TEST_NEW_EGG = /opt/homebrew/Cellar/chicken/5.3.0_1/bin/test-new-egg
9+
TEST_NEW_EGG = test-new-egg # homebrew: /opt/homebrew/Cellar/chicken/5.3.0_1/bin/test-new-egg
2010

2111
CLARG =
2212
LEVEL = -O3
@@ -111,4 +101,3 @@ clean:
111101
matrico.so matrico.import.scm matrico.import.so matrico.static.o \
112102
matrico.build.sh matrico.install.sh matrico.link matrico.static.so \
113103
matrico-$(VERSION).tar.gz PROFILE.*
114-

README.md

Lines changed: 38 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -39,22 +39,38 @@
3939

4040
### Install and Test `matrico` Egg
4141

42-
```
42+
```shell
4343
CHICKEN_INSTALL_REPOSITORY="/my/egg/directory/" chicken-install -test matrico
4444
```
4545

4646
### Locate and Provide `matrico` Egg
4747

48-
```
48+
```shell
4949
CHICKEN_REPOSITORY_PATH="`chicken-install -repository`:/my/egg/directory/" csi
5050
```
5151

52-
### Run Demo Code
52+
### Clone and Try `matrico` Code
5353

54+
```scheme
55+
(load "matrico.scm")
56+
57+
(import matrico)
5458
```
59+
60+
### Run Demo Code
61+
62+
```scheme
5563
(load "RUNME.scm")
5664
```
5765

66+
```scheme
67+
(load "demos/heat.scm")
68+
```
69+
70+
```scheme
71+
(load "demos/flame.scm")
72+
```
73+
5874
### Minimal Explanation
5975

6076
`matrico` is a ...
@@ -208,17 +224,17 @@ CHICKEN_REPOSITORY_PATH="`chicken-install -repository`:/my/egg/directory/" csi
208224

209225
* `(mx-ref mat row col)` **flonum** being **matrix** `mat` entry in row and column specified by positive **fixnum**s `row`, `col`.
210226

227+
* `(mx-set mat row col val)` returns **matrix** copy of **matrix** `mat` but with entry in row **fixnum** `row` and column **fixnum** `col` set to **flonum** or one-by-one **matrix** `val`.
228+
229+
* `(mx-set! mat row col val)` returns **void**, sets entry of **matrix** `mat` in row and column specified by positive **fixnum**s `row` and `col` to **flonum** or one-by-one **matrix** `val`.
230+
211231
* `(mx-col mat col)` returns **matrix** being **matrix** `mat`'s column specified by positive **fixnum** `col`.
212232

213233
* `(mx-row mat row)` returns **matrix** being **matrix** `mat`'s row specified by positive **fixnum** `row`.
214234

215-
* `(mx-submatrix mat row1 row2 col1 col2)` returns **matrix** holding entries of **matrix** `mat` in rows specified by positive **fixnum**s `row1` to `row2` and columns specified by positive **fixnum**s `col1` to `col2`.
216-
217235
* `(mx-diag mat)` returns column-**matrix** holding **matrix** `mat`'s diagonal entries.
218236

219-
* `(mx-set mat row col val)` returns **matrix** copy of **matrix** `mat` but with entry in row **fixnum** `row` and column **fixnum** `col` set to **flonum** or one-by-one **matrix** `val`.
220-
221-
* `(mx-set! mat row col val)` returns **void**, sets entry of **matrix** `mat` in row and column specified by positive **fixnum**s `row` and `col` to **flonum** or one-by-one **matrix** `val`.
237+
* `(mx-submatrix mat row1 row2 col1 col2)` returns **matrix** holding entries of **matrix** `mat` in rows specified by positive **fixnum**s `row1` to `row2` and columns specified by positive **fixnum**s `col1` to `col2`.
222238

223239
#### Matrix Expanders
224240

@@ -232,8 +248,6 @@ CHICKEN_REPOSITORY_PATH="`chicken-install -repository`:/my/egg/directory/" csi
232248

233249
* `(mx^ x y)` returns **matrix** of entry-wise exponentiation of **matrix**es `x` to the `y`.
234250

235-
* `(mx-dist x y)` returns **matrix** of entry-wise absolute differences of **matrix**es `x` and `y`, aka distance.
236-
237251
* `(mx-where pred x y)` returns **matrix** of entries of **matrix**es `x` or `y` based on predicate **procedure** `pred`.
238252

239253
* `(mx*+ a x y)` returns **matrix** of entry-wise generalized addition of **flonum** `a` times **matrix** `x` plus **matrix** `y`, aka axpy.
@@ -502,6 +516,12 @@ CHICKEN_REPOSITORY_PATH="`chicken-install -repository`:/my/egg/directory/" csi
502516

503517
##### Internal
504518

519+
* `(matrix-or-flonum? val)` returns **boolean** answering if argument `val` is a **flonum** or **matrix**.
520+
521+
* `(scalar-or-flonum? val)` returns **boolean** answering if argument `val` is a **flonum** or scalar **matrix**.
522+
523+
* `(column-or-flonum? val)` returns **boolean** answering if argument `val` is a **flonum** or column **matrix**.
524+
505525
* `(ensure-mx val)` returns one-by-one **matrix** if `val` is **flonum**, or `val` if `val` is **matrix**.
506526

507527
* `(ensure-fp val)` returns **flonum** if `val` is **flonum**, or element if `val` is one-by-one **matrix**.
@@ -510,8 +530,6 @@ CHICKEN_REPOSITORY_PATH="`chicken-install -repository`:/my/egg/directory/" csi
510530

511531
* `(translate-rows idx)` returns **fixnum** for **matrix** `mat` translated row index **fixnum** `idx` (from 1-based to 0-based and from end).
512532

513-
* `(back-subst R b)` column-**matrix** solving linear problem of upper-right triangular-**matrix** `R` and column-**matrix** `b` by back substitution.
514-
515533
* `(time-stepper typ fun x0 dt tf)` states-times-steps **matrix** trajectory solving an ordinary differential equation, by method **procedure** `typ`, with vector field **procedure** `fun`, initial state column-**matrix** `x0`, time step **flonum** `dt`, and time horizon **flonum** `tf`.
516534

517535
#### Matrix Backend Library
@@ -521,7 +539,7 @@ Defines the matrix type (record) as column-major list-of-columns and provides ge
521539

522540
* `(matrix? any)` returns **boolean** answering if `any` is a **matrix**, generated by `define-record`.
523541

524-
* `(make-matrix lst cols)` returns **matrix** from list `lst` of columns and **fixnum** number `cols` of columns, generated by `define-record`.
542+
* `(make-matrix cols lst)` returns **matrix** from list `lst` of columns and **fixnum** number `cols` of columns, generated by `define-record`.
525543

526544
* `(make-matrix* rows cols val)` returns `rows`-by-`cols` **matrix** with all entries set to `val` for **fixnum**s `rows`, `cols`.
527545

@@ -547,17 +565,17 @@ Defines the matrix type (record) as column-major list-of-columns and provides ge
547565

548566
* `(matrix-ref mat row col)` returns **any** being **matrix** `mat` entry in **fixnum** `row` and **fixnum** `col`umns.
549567

568+
* `(matrix-set mat row col val)` returns **matrix** copy of **matrix** `mat` but with entry in row **fixnum** `row` and column **fixnum** `col` set to `val`.
569+
570+
* `(matrix-set! mat row col val)` returns **any**, sets entry of **matrix** `mat` in row **fixnum** `row` and column **fixnum** `col` to `val`.
571+
550572
* `(matrix-col mat col)` returns **matrix** being **matrix** `mat` column specified by **fixnum** `col`.
551573

552574
* `(matrix-row mat row)` returns **matrix** being **matrix** `mat` row specified by **fixnum** `row`.
553575

554-
* `(matrix-submatrix mat row1 row2 col1 col2)` returns **matrix** holding entries of **matrix** `mat` from rows **fixnum**s `row1` to `row2` in columns **fixnum**s `col1` to `col2`.
555-
556576
* `(matrix-diag mat)` returns **matrix** holding **matrix** `mat` diagonal entries as column-**matrix**.
557577

558-
* `(matrix-set mat row col val)` returns **matrix** copy of **matrix** `mat` but with entry in row **fixnum** `row` and column **fixnum** `col` set to `val`.
559-
560-
* `(matrix-set! mat row col val)` returns **any**, sets entry of **matrix** `mat` in row **fixnum** `row` and column **fixnum** `col` to `val`.
578+
* `(matrix-submatrix mat row1 row2 col1 col2)` returns **matrix** holding entries of **matrix** `mat` from rows **fixnum**s `row1` to `row2` in columns **fixnum**s `col1` to `col2`.
561579

562580
* `(matrix-col? mat)` returns **boolean** answering if **matrix** `mat` has only a single column.
563581

@@ -621,8 +639,6 @@ Specifies generic column functions for matrix library with f64vector (flonum vec
621639
#### Homogeneous Flonum Vector Module
622640
Provides homogeneous vector transformations analogous to vectors.
623641

624-
* `(f64vector-id)` is **string** `"#f64"`.
625-
626642
* `(f64vector-unfold dim fun)` returns **f64vector** of dimension **fixnum** `dim` with procedurally generated elements by **procedure** `fun`.
627643

628644
* `(f64vector-concat . vecs)` returns **f64vector** of concatenated **list**-of-**f64vector**(s) `vecs`.
@@ -702,14 +718,14 @@ Provides additional mathematical functions, extending CHICKEN's `flonum` module.
702718

703719
* `(fplncosh x)` returns **flonum** log-cosh of **flonum** `x`.
704720

705-
* `(fpgauss x)` returns **flonum** Gauss bell curve function evaluation of **flonum** `x`.
706-
707721
* `(fpsignsqrt x)` returns **flonum** sign times square root of absolute value of **flonum** `x`.
708722

709723
* `(fpsinc x)` returns **flonum** cardinal sine function with removed singularity of **flonum** `x`.
710724

711725
* `(fpsigm x)` returns **flonum** standard logistic function of **flonum** `x`, aka sigmoid.
712726

727+
* `(fpgauss x)` returns **flonum** Gauss bell curve function evaluation of **flonum** `x`.
728+
713729
* `(fpstirling x)` returns **flonum** Stirling approximation of factorial of **flonum** `x`.
714730

715731
* `(fptaper x)` returns **string** representation of **flonum** `x` formatted to 8 character fixed width.

matrico.release-info

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@
1313
(release "0.3rel")
1414

1515
(release "0.4rc1")
16-
16+
(release "0.4rel")

src/mx.scm

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -834,7 +834,6 @@
834834
(cmgs (fx+1 i) (mx*+ (fpneg Rik) (head Qi) Qk) (tail Qi)))]))
835835
(cons Rk R))))))
836836

837-
; TODO:
838837
;;@returns: **function** returning column-**matrix** solving the linear (least-squares) problem of **matrix** `mat`, given a column-**matrix** `vec` via QR decomposition.
839838
(define* (mx-solver mat)
840839
(returns "**function** returning column-**matrix** solving the linear (least-squares) problem of **matrix** `mat`, given a column-**matrix** `vec` via QR decomposition.")

version.scm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
(define (matrico-version) "0.4rc1")
1+
(define (matrico-version) "0.4rel")
22

0 commit comments

Comments
 (0)