70_transformation_functions: Transformation Functions.

Description Usage Arguments Details Value See Also Examples

Description

Transformation functions for GeomArray and MatrixArray objects.

The generalize the binary operators, used for Matrix Array Multiplication.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
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)

Arguments

a, b

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.

gby.rhs

Logical, if true, group by the sub-objects within the RHS object.

gby.trans

Logical, if true (default), group by (or nest by) sub-objects within the transformation object.

rolling

Logical, if true (default), extend the arrays (repeating where necessary), otherwise, nest the expansions.

pack

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.

Details

Reiterating, these functions generalize the binary operators, used for Matrix Array Multiplication.

Please refer to them, for an overview.

Value

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).

See Also

Matrix Array Multiplication

Examples

1
2
x <- matrix (1:4, 2, 2)
vt3.gmult.pre (ascl2 (1:4), x)

vectools documentation built on June 7, 2021, 9:08 a.m.