Transformation functions for GeomArray and MatrixArray objects.
The generalize the binary operators, used for Matrix Array Multiplication.
vt3.mmult (a, b)
vt3.mmultc (a, b, …, gby.rhs=FALSE)vt3.gmult.pre (a, b)
vt3.gmultc.pre (a, b, …, gby.trans=TRUE, rolling=TRUE)
vt3.gmult.post (a, b)
vt3.gmultc.post (a, b, …, gby.trans=TRUE, rolling=TRUE)
vt3.cmult.pre (a, b, …, pack=TRUE)
vt3.rmult.post (a, b, pack=TRUE)
In simple matrix-array multiplication, matrices or MatrixArray(s). In pre-multiplication, a is the transformation object and b is the data object. In post-multiplication, a is the data object and b is the transformation object. The transformation object should be a matrix or MatrixArray. The data object should a matrix, GeomObject, GeomArray or MatrixArray. Except for row-wise and col-wise functions (vt3.cmult.pre/vt3.rmult.post), where the data object should be a matrix.
Logical, if true, group by the sub-objects within the RHS object.
Logical, if true (default), group by (or nest by) sub-objects within the transformation object.
Logical, if true (default), extend the arrays (repeating where necessary), otherwise, nest the expansions.
Logical, if true (the default) add/strip and extra row/column to the data object. This allows a 3 by 3 transformation matrix to be multiply a two-colum data matrix. Ignored, for GeomObject(s).
Ignored.
A matrix for the vt3.cmult.pre/vt3.rmult.post functions. (These are used for row-wise and column-wise matrix multiplication).
A matrix, GeomObject, GeomArray or MatrixArray for other functions.
By default, cartesian-based multiplication uses the rolling option, where the length of the output will match the length of the cartesian product.
If the nested/nonrolling option is used, then the length will match the length of the grouping operand. (This is determined by the gby.rhs and gby.trans args).
Reiterating, these functions generalize the binary operators, used for Matrix Array Multiplication.
Please refer to them, for an overview.
# NOT RUN {
x <- matrix (1:4, 2, 2)
vt3.gmult.pre (ascl2 (1:4), x)
# }
Run the code above in your browser using DataLab