-- Option variable: use_fast_arrays - if
true then only two types of arrays are recognized.
1) The art-q array (t in Common Lisp) which may have several dimensions indexed by integers, and may hold any Lisp or Maxima object as an entry. To construct such an array, enter
a will have as value, an array with twelve slots, and the indexing is zero based.
2) The Hash_table array which is the default type of array created if one does
b is not already an array, a list, or a matrix - if it were one of these an error would be caused since
x+1 would not be a valid subscript for an art-q array, a list or a matrix). Its indices (also known as keys) may be any object. It only takes one key at a time (
b[x+1,u]:y would ignore the
u). Referencing is done by
b[x+1] ==> y^2. Of course the key may be a list, e.g.
b[[x+1,u]]:y would be valid. This is incompatible with the old Maxima hash arrays, but saves consing.
An advantage of storing the arrays as values of the symbol is that the usual conventions about local variables of a function apply to arrays as well. The Hash_table type also uses less consing and is more efficient than the old type of Maxima hashar. To obtain consistent behaviour in translated and compiled code set
translate_fast_arrays to be
(%o1) true (%i2)
F_1 (x) := x - 100;
F_2 (x, y) := x / y;
define (F_3 (x), sqr...
f_1 (x) := x - 100;
f_2 (x, y) := x / y;
define (f_3 (x), sqr...