Functions and Formulas  

Matrices  

Matrices

getMatrix

Returns a vector the same size as the two input vectors. The result contains the cells of the given matrix found at the coordinates specified by x and y.

Collection getMatrix(Collection x, Collection y, Collection matrix)

Parameters
x : is a vector containing coordinates for the first dimension of the matrix
y : is a vector containing coordinates for the second dimension of the matrix
matrix : is a matrix

identicalRows

detects identical rows or columns in a matrix or tensor.

Collection identicalRows(Collection tensor, Object rowdim, Object coldim)

Parameters
tensor : is the matrix or tensor to be checked
rowdim : is the row dimension index or tree
coldim : is the column dimension index or tree

ifSelected

Inserts a given value into all cells of a matrix whose columns and rows are found in two collections of selected items.

Collection ifSelected(Collection matrix, Object sel0, Object sel1, Object val)

Parameters
matrix : The input matrix
sel0 : A tree or custom list value containing the selected rows
sel1 : A tree or custom list value containing the selected columns
val : The value to be inserted into a cell, if column and row are both found in the two collection of selected items.

isEmptyRow

detects empty rows or columns in a matrix or tensor.

Collection isEmptyRow(Collection tensor, Object rowdim, Object coldim)

Parameters
tensor : is the matrix or tensor to be checked
rowdim : is the row dimension index or tree
coldim : is the column dimension index or tree

merge

returns either the first or second function argument depending on the state and value of the first argument

Collection merge(Collection x, Collection y, Collection v=nothing)

Parameters
x : contains the primary values
y : contains the secondary values
v : a primary value equal to this will be ignored and the secondary value will be taken instead

mirrorCustom

Completes a partially filled Automatrix (quadratic matrix) by filling empty cells with the inverse values of the corresponding transposed cells..

Collection mirrorCustom(Collection x, Collection lt, Collection eq, Collection gt)

Parameters
x : is the partially filled Automatrix
lt : is the value for 'less important'
eq : is the value for 'equally important'
gt : is the value for 'more important'

mirrorNeg

Completes a partially filled Automatrix (quadratic matrix) by filling empty cells with the negated values of the corresponding transposed cells.

Collection mirrorNeg(Collection x)

Parameters
x : is the partially filled Automatrix

mirrorReciprocal

Completes a partially filled automatrix (quadratic matrix) by filling empty cells with the inverse values of the corresponding transposed cells.

Collection mirrorReciprocal(Collection x, float total=0.0, boolean ahp=true)

Parameters
x : is the partially filled automatrix
total : the intended total sum for each column of the result, 1.0 for percentage, 0.0 to skip normalization
ahp : if true, only items belonging to the same group will be part of the result.

Feedback

Did you find what you needed?

If you have any further questions or suggestions to improve this page, please let us know:

=