This provides array math for a special case of matrices, so called jagged arrays.
Static member | Description |
Full Usage:
JaggedArrayMath.Add(a, arows, acols, b, brows, bcols, c, crows, ccols)
Parameters:
float[][]
-
First operand.
arows : int
-
Number of rows of a.
acols : int
-
Number of columns of a.
b : float[][]
-
Second operand.
brows : int
-
Number of rows of b.
bcols : int
-
Number of columns of b.
c : float[][]
-
The matrix where to store the result. Has to be of same dimensions than a and b.
crows : int
-
Number of rows of c.
ccols : int
-
Number of columns of c.
|
Calculates a+b and stores the result in matrix c.
|
Full Usage:
JaggedArrayMath.AddRow(a, arows, acols, b, brows, bcols, browToAdd, c, crows, ccols)
Parameters:
float[][]
-
First operand.
arows : int
-
Number of rows of a.
acols : int
-
Number of columns of a.
b : float[][]
-
Second operand.
brows : int
-
Number of rows of b.
bcols : int
-
Number of columns of b.
browToAdd : int
-
The row number of matrix b which should be added to all rows of matrix a.
c : float[][]
-
The matrix where to store the result. Has to be of same dimensions than a and b.
crows : int
-
Number of rows of c.
ccols : int
-
Number of columns of c.
|
Add the row
|
Full Usage:
JaggedArrayMath.DivideRow(a, arows, acols, b, brows, bcols, browForDivision, resultIfNull, c, crows, ccols)
Parameters:
float[][]
-
First operand (minuend).
arows : int
-
Number of rows of a.
acols : int
-
Number of columns of a.
b : float[][]
-
Second operand (subtrahend).
brows : int
-
Number of rows of b.
bcols : int
-
Number of columns of b.
browForDivision : int
-
The row number of matrix b which serves as denominator.
resultIfNull : float
-
If the denominator is null, the result is set to this number.
c : float[][]
-
The matrix where to store the result. Has to be of same dimensions than a. Must not be identical to b.
crows : int
-
Number of rows of c.
ccols : int
-
Number of columns of c.
|
Divides all rows of matrix a by the row
|
Full Usage:
JaggedArrayMath.GetMatrixArray(n, m)
Parameters:
int
-
First matrix dimension (rows).
m : int
-
Second matrix dimension( columns).
Returns: float[][]
Array of dimensions n x m.
|
Allocates an array of n x m values.
|
Full Usage:
JaggedArrayMath.GetMatrixCopy(a)
Parameters:
IROMatrix<float>
-
The matrix to copy.
Returns: float[][]
New jagged array with the same element values than matrix a.
|
Allocates an array of the same dimensions than the provided matrix a, and copies the element of a to the new array.
|
Full Usage:
JaggedArrayMath.Multiply(a, arows, acols, b, brows, bcols, c, crows, ccols)
Parameters:
float[][]
-
First multiplicant.
arows : int
-
Number of rows of a.
acols : int
-
Number of columns of a.
b : float[][]
-
Second multiplicant.
brows : int
-
Number of rows of b.
bcols : int
-
Number of columns of b.
c : float[][]
-
The matrix where to store the result. Has to be of dimension (arows, bcols).
crows : int
-
Number of rows of c.
ccols : int
-
Number of columns of c.
|
Multiplies matrix a with matrix b and stores the result in matrix c.
|
Full Usage:
JaggedArrayMath.MultiplyFirstTransposed(a, arows, acols, b, brows, bcols, c, crows, ccols)
Parameters:
float[][]
-
First multiplicant.
arows : int
-
Number of rows of a.
acols : int
-
Number of columns of a.
b : float[][]
-
Second multiplicant.
brows : int
-
Number of rows of b.
bcols : int
-
Number of columns of b.
c : float[][]
-
The matrix where to store the result. Has to be of dimension (acols, bcols).
crows : int
-
Number of rows of c.
ccols : int
-
Number of columns of c.
|
Multiplies matrix a_transposed with matrix b and stores the result in matrix c.
|
Full Usage:
JaggedArrayMath.MultiplyFirstTransposedWithItself(a, arows, acols, c, crows, ccols)
Parameters:
float[][]
-
First and second multiplicant.
arows : int
-
Number of rows of a.
acols : int
-
Number of columns of a.
c : float[][]
-
The matrix where to store the result. Has to be of dimension (acols, acols).
crows : int
-
Number of rows of c.
ccols : int
-
Number of columns of c.
|
Multiplies matrix a_transposed with matrix a itself and stores the result in matrix c.
|
Full Usage:
JaggedArrayMath.MultiplyRow(a, arows, acols, b, brows, bcols, browToMultiply, c, crows, ccols)
Parameters:
float[][]
-
First multiplicant.
arows : int
-
Number of rows of a.
acols : int
-
Number of columns of a.
b : float[][]
-
Second multiplicant.
brows : int
-
Number of rows of b.
bcols : int
-
Number of columns of b.
browToMultiply : int
-
The row number of matrix b to multiply.
c : float[][]
-
The matrix where to store the result. Has to be of same dimension than a.
crows : int
-
Number of rows of c.
ccols : int
-
Number of columns of c.
|
Multiplies the row
|
Full Usage:
JaggedArrayMath.MultiplyScalar(a, arows, acols, b, c, crows, ccols)
Parameters:
float[][]
-
The first multiplicant.
arows : int
-
Number of rows of a.
acols : int
-
Number of columns of a.
b : float
-
The second multiplicant.
c : float[][]
-
The resulting matrix. Has to be of same dimensions than a.
crows : int
-
Number of rows of c.
ccols : int
-
Number of columns of c.
|
Multiplies the matrix a with a scalar value b and stores the result in c. Matrix a and c are allowed to be the same matrix.
|
Full Usage:
JaggedArrayMath.MultiplySecondTransposed(a, arows, acols, b, brows, bcols, c, crows, ccols)
Parameters:
float[][]
-
First multiplicant.
arows : int
-
Number of rows of a.
acols : int
-
Number of columns of a.
b : float[][]
-
Second multiplicant.
brows : int
-
Number of rows of b.
bcols : int
-
Number of columns of b.
c : float[][]
-
The matrix where to store the result. Has to be of dimension (arows, brows).
crows : int
-
Number of rows of c.
ccols : int
-
Number of columns of c.
|
Multiplies matrix a with matrix b_transposed and stores the result in matrix c.
|
Full Usage:
JaggedArrayMath.Subtract(a, arows, acols, b, brows, bcols, c, crows, ccols)
Parameters:
float[][]
-
First operand (minuend).
arows : int
-
Number of rows of a.
acols : int
-
Number of columns of a.
b : float[][]
-
Second operand (subtrahend).
brows : int
-
Number of rows of b.
bcols : int
-
Number of columns of b.
c : float[][]
-
The matrix where to store the result a-b . Has to be of same dimensions than a and b.
crows : int
-
Number of rows of c.
ccols : int
-
Number of columns of c.
|
Calculates a-b and stores the result in matrix c.
|
Full Usage:
JaggedArrayMath.SubtractColumn(a, arows, acols, b, brows, bcols, bcolToSubtract, c, crows, ccols)
Parameters:
float[][]
-
First operand (minuend).
arows : int
-
Number of rows of a.
acols : int
-
Number of columns of a.
b : float[][]
-
Second operand (subtrahend).
brows : int
-
Number of rows of b.
bcols : int
-
Number of columns of b.
bcolToSubtract : int
-
The column number of matrix b which should be subtracted from all columns of matrix a.
c : float[][]
-
The matrix where to store the result. Has to be of same dimensions than a. Must not be identical to b.
crows : int
-
Number of rows of c.
ccols : int
-
Number of columns of c.
|
Subtract the column
|
Full Usage:
JaggedArrayMath.SubtractProductFromSelf(a, arows, acols, b, brows, bcols, c, crows, ccols)
Parameters:
float[][]
-
First operand of multiplication.
arows : int
-
Number of rows of a.
acols : int
-
Number of columns of a.
b : float[][]
-
Second operand of multiplication.
brows : int
-
Number of rows of b.
bcols : int
-
Number of columns of b.
c : float[][]
-
The matrix where to store the result c = c - a*b . Has to be of same dimensions than the product of a and b.
crows : int
-
Number of rows of c.
ccols : int
-
Number of columns of c.
|
Calculates c = c - ab
|
Full Usage:
JaggedArrayMath.SubtractProductFromSelf(a, arows, acols, b, c, crows, ccols)
Parameters:
float[][]
-
First operand of multiplication.
arows : int
-
Number of rows of a.
acols : int
-
Number of columns of a.
b : float
-
Second multiplicant.
c : float[][]
-
The third operand and matrix where to store the result c = c - a*b . Has to be of same dimensions than a.
crows : int
-
Number of rows of c.
ccols : int
-
Number of columns of c.
|
Calculates c = c - ab
|
Full Usage:
JaggedArrayMath.SubtractRow(a, arows, acols, b, brows, bcols, browToSubtract, c, crows, ccols)
Parameters:
float[][]
-
First operand (minuend).
arows : int
-
Number of rows of a.
acols : int
-
Number of columns of a.
b : float[][]
-
Second operand (subtrahend).
brows : int
-
Number of rows of b.
bcols : int
-
Number of columns of b.
browToSubtract : int
-
The row number of matrix b which should be subtracted from all rows of matrix a.
c : float[][]
-
The matrix where to store the result. Has to be of same dimensions than a. Must not be identical to b.
crows : int
-
Number of rows of c.
ccols : int
-
Number of columns of c.
|
Subtract the row
|
Full Usage:
JaggedArrayMath.ToMatrix(x, rows, cols)
Parameters:
float[][]
-
The jagged array. Each double[] vector is a row of the matrix.
rows : int
-
The number of (used) rows of the array.
cols : int
-
The number of (used) columns of the array.
Returns: JaggedArrayMatrix
A jagged array matrix wrapping the provided array with a IMatrix interface.
|
|
Full Usage:
JaggedArrayMath.ToTransposedMatrix(x, rows, cols)
Parameters:
float[][]
-
The jagged array. Each double[] vector is a column of the matrix (because of transpose).
rows : int
-
The number of (used) rows of the resulting matrix.
cols : int
-
The number of (used) columns of the resulting matrix = length of the first level of the jagged array.
Returns: IMatrix<float>
A IROMatrix wrapping the provided array so that it seems to be transposed.
|
This wraps a jagged double array to the IROMatrix interface so that the array appears to be transposed. The data is not copied!
|
Full Usage:
JaggedArrayMath.ToTransposedROMatrix(x, rows, cols)
Parameters:
float[][]
-
The jagged array. Each double[] vector is a column of the matrix (because of transpose).
rows : int
-
The number of (used) rows of the resulting matrix.
cols : int
-
The number of (used) columns of the resulting matrix = length of the first level of the jagged array.
Returns: IROMatrix<float>
A IROMatrix wrapping the provided array so that it seems to be transposed.
|
This wraps a jagged double array to the IROMatrix interface so that the array appears to be transposed. The data is not copied!
|