Метод | Описание | |
---|---|---|
Add ( Primitive matrix1, Primitive matrix2, Primitive result ) : Primitive |
Add two matrices, the number of rows and columns of the 3 matrices given must be the same. Alternatively, if the second matrix is a scalar number then it is added to each element of the first matrix.
|
|
Copy ( Primitive matrix1, Primitive matrix2 ) : Primitive |
Copy one matrix to an existing matrix. The dimensions of the 2 matrices must be the same.
|
|
CopyNew ( Primitive matrix ) : Primitive |
Copy one matrix to a new matrix.
|
|
CopyToSBArray ( Primitive matrix ) : Primitive |
Copy LDMatrix type to SmallBasic array type. The reverse operation (SmallBasic to LDMatrix) isn't possible becuase the SmallBasic indexes are not necessarily contiguous integers.
|
|
Create ( Primitive rows, Primitive cols ) : Primitive |
Create a matrix object. Row and column matrices can be defined with rows = 1 or cols = 1 respectively.
|
|
Delete ( Primitive matrix ) : Primitive |
Delete an existing matrix (not generally required, but can save memory if lots of matrices are created).
|
|
GetValue ( Primitive matrix, Primitive row, Primitive col ) : Primitive |
Get value in matrix.
|
|
Inverse ( Primitive matrix, Primitive inverse ) : Primitive |
Calculate the inverse of a matrix (using Gaussian Elimination). The number of rows and columns of the matrix and inverse must be the same (square matrices). A singular matrix returns "SINGULAR" and the inverse matrix will be incorrect.
|
|
Multiply ( Primitive matrix1, Primitive matrix2, Primitive result ) : Primitive |
Multiply two matrices, the number of columns of the first and rows of the second matrix must be the same. The number of rows and columns of the result matrix must be the rows of the first and columns of the second. Alternatively, if the second matrix is a scalar number then it is multiplied by each element of the first matrix and the dimensions of the first and result must be the same.
|
|
SetValue ( Primitive matrix, Primitive row, Primitive col, Primitive value ) : Primitive |
Set value in matrix.
|
|
Transpose ( Primitive matrix, Primitive transpose ) : Primitive |
Calculate the transpose of a matrix. The number of rows and columns of the matrix and transpose must be reversed (cols = rows and vice versa).
|
|
View ( Primitive matrix, Primitive modal ) : void |
View a matrix for dubugging purposes.
|
Метод | Описание | |
---|---|---|
getMatrix ( string name ) : Matrix | ||
getNewNumber ( ) : int |
public static Add ( Primitive matrix1, Primitive matrix2, Primitive result ) : Primitive | ||
matrix1 | Primitive | The first matrix. |
matrix2 | Primitive | The second matrix (or scalar value). |
result | Primitive | The result matrix. |
Результат | Primitive |
public static Copy ( Primitive matrix1, Primitive matrix2 ) : Primitive | ||
matrix1 | Primitive | /// The matrix to copy from. /// |
matrix2 | Primitive | /// The matrix to copy to. /// |
Результат | Primitive |
public static CopyNew ( Primitive matrix ) : Primitive | ||
matrix | Primitive | /// The matrix to copy. /// |
Результат | Primitive |
public static CopyToSBArray ( Primitive matrix ) : Primitive | ||
matrix | Primitive | /// The matrix name. /// |
Результат | Primitive |
public static Create ( Primitive rows, Primitive cols ) : Primitive | ||
rows | Primitive | The number of rows. |
cols | Primitive | The number of columns. |
Результат | Primitive |
public static Delete ( Primitive matrix ) : Primitive | ||
matrix | Primitive | /// The matrix name. /// |
Результат | Primitive |
public static GetValue ( Primitive matrix, Primitive row, Primitive col ) : Primitive | ||
matrix | Primitive | /// The matrix name. /// |
row | Primitive | /// The row at which to get the value (indexed starting from 1). /// |
col | Primitive | /// The column at which to get the value (indexed starting from 1). /// |
Результат | Primitive |
public static Inverse ( Primitive matrix, Primitive inverse ) : Primitive | ||
matrix | Primitive | The matrix to invert (unmodified by inversion). |
inverse | Primitive | The inverse matrix. |
Результат | Primitive |
public static Multiply ( Primitive matrix1, Primitive matrix2, Primitive result ) : Primitive | ||
matrix1 | Primitive | The first matrix. |
matrix2 | Primitive | The second matrix (or scalar value). |
result | Primitive | The result matrix. |
Результат | Primitive |
public static SetValue ( Primitive matrix, Primitive row, Primitive col, Primitive value ) : Primitive | ||
matrix | Primitive | /// The matrix name. /// |
row | Primitive | /// The row at which to add the value (indexed starting from 1). /// |
col | Primitive | /// The column at which to add the value (indexed starting from 1). /// |
value | Primitive | /// The value. /// |
Результат | Primitive |
public static Transpose ( Primitive matrix, Primitive transpose ) : Primitive | ||
matrix | Primitive | The matrix to transpose. |
transpose | Primitive | The resulting transposed matrix. |
Результат | Primitive |
public static View ( Primitive matrix, Primitive modal ) : void | ||
matrix | Primitive | The matrix to display. |
modal | Primitive | The matrix display will pause all other actions until it is closed. ("True" or "False"). |
Результат | void |