* Added parameter `array-strictness', default #t
* Added `array-default-strict!' and `array-default-strict', which act
like the functions without "default" in the name when
`array-strictness' is #t; otherwise they do nothing
* Lots of small changes to existing array functions, mostly to ensure
computations are done using nonstrict arrays, but return values are
strict when `array-strictness' is #t
* Added strictness tests
* Added tests to ensure untyped code can use `math/array'
* Rewrote `array-map' exported to untyped code using untyped Racket
* Rearranged a lot of `math/array' documentation
* Gram-Schmidt using vector type
* QR decomposition
* Operator 1-norm and maximum norm; stub for 2-norm and angle between
subspaces (`matrix-basis-angle')
* `matrix-absolute-error' and `matrix-relative-error'; also predicates
based on them, such as `matrix-identity?'
* Lots of shuffling code about
* Types that can have contracts, and an exhaustive test to make sure
every value exported by `math/matrix' has a contract when used in
untyped code
* Some more tests (still needs some)
* Finally added `array-axis-expand' as a dual for `array-axis-reduce'
in order to implement `vandermonde-matrix' elegantly
* Better, shorter matrix multiply; reworked all matrix arithmetic
* Split "matrix-operations.rkt" into at least 5 parts:
* "matrix-operations.rkt"
* "matrix-basic.rkt"
* "matrix-comprehension.rkt"
* "matrix-sequences.rkt"
* "matrix-column.rkt"
Added "matrix-constructors.rkt"
Added `matrix', `row-matrix', and `col-matrix' macros
A lot of other little changes
Currently, `in-row' and `in-column' are broken. I intend to implement
them in a way that makes them work in untyped and Typed Racket.
* `list->array' now accepts an optional shape argument, and always returns
an immutable array
* `vector->array' now accepts an optional shape argument, and always
returns a mutable array
* Removed `make-mutable-array' because `vector->array' does its job now (I
never liked the name anyway)
* Renamed `unsafe-mutable-array' to `unsafe-vector->array'
* Added optional type annotation to `array' macro to match `mutable-array'
* Reworded error messages in array broadcasting functions
* Made minor array doc fixes
Cleaned up expected value code a little
Refactored running statistics objects (hid private fields, added
`update-statistics*')
Documented expected value functions and running statistics
Removed `bfpsi0' from bigfloat tests (DrDr's libmpfr doesn't have it)
Commented out custodian shutdown callback that frees MPFR's cache
(something's broken)
original array strict instead of returning a new strict array.
(Finally!) The hard part is keeping the Array type covariant. The
solution is to keep the store in the closure of the array's
procedure instead of in the Array struct itself.
Cleaned up other docs in preparation for alpha-testing announcement
Created `math/utils' module for stuff that doesn't go anywhere else (e.g.
FFT scaling convention, max-math-threads parameters)
Reduced the number of macros that expand to applications of `array-map'
Added `flvector-sum', defined `flsum' in terms of it
Reduced the number of pointwise `flvector', `flarray' and `fcarray' operations
Reworked `inline-build-flvector' and `inline-flvector-map' to be faster and
expand to less code in both typed and untyped Racket
Redefined conversions like `list->flvector' in terms of for loops (can do
it now that TR has working `for/flvector:', etc.)
Refactored many of the fold functions (e.g. `array-axis-andmap' is gone,
replaced by short-cutting `array-axis-and', which is sufficient because the
result of `array-map' is non-strict; added `array-count', `array-all-fold';
removed `array-all=' and friends)
Turned common folds into macros (preserves return types better, speeds up
compilation time)
Exposed a safe variant of `unsafe-array-axis-reduce'
Replaced pointwise operators with macros that expand to applications of `array-map'; allows more precise return types and reduces compilation time
Changed literal array syntax to use #() to delimit rows instead of [] (still suggest using square parens, though)
Minor refactoring
Fixed a macro so that the only problem with "array-tests.rkt" now is that typed/rackunit is b0rked
in the original GitHub fork:
https://github.com/ntoronto/racket
Some things about this are known to be broken (most egregious is that the
array tests DO NOT RUN because of a problem in typed/rackunit), about half
has no coverage in the tests, and half has no documentation. Fixes and
docs are coming. This is committed now to allow others to find errors and
inconsistency in the things that appear to be working, and to give the
author a (rather incomplete) sense of closure.