How is the
matrico source code organized?
matrico project is supposed to be a module wrapped in a CHICKEN Scheme egg.
Hence, a module named “matrico” contains all user-facing functions.
There are two types of function in the matrico module:
first, functions beginning with “matrico”, which provide
matrico specific meta-data functionality,
second, functions beginning with “mx”, which provide the core matrix functionality.
While the former (“matrico” functions) are defined in the
matrico.scm source file,
the latter (“mx” functions) are defined in the
src/mx.scm source file, that is included (CHICKEN Scheme provides
All but one module depend on the
utils module, defined in
This module provides extra generic or universal functionality.
fpmath module, defined in
src/fpmath.scm depends on
and provides additional flonum (floating-point number) functions.
f64vector module, defined in
src/f64vector.scm, depends on
fpmath (the latter may become redundant with newer versions of CHICKEN Scheme),
and provides map-reduce functions for homogeneous f64 (double-precision flonum) vectors.
matrix functor (CHICKEN Scheme has functors which are modules parametrizable by other modules)
depends only on
utils and provides map-reduce functionality for a generic matrix type.
dense module then specializes
matrix functor via its
Finally, the main
matrico module depends on the
In summary, following is the module hierarchy:
matricomodule (user-facing; depends
mxlibrary (included by
This means a user will only see functions prefixed with
hence, only these functions will do argument checks. All lower level functions
will assume admissible arguments.
Furthermore, a basic test library is defined in
while the per module tests are set up in
and called from