public class IntSquareMatrix extends IntMatrix
| Modifier and Type | Class and Description |
|---|---|
static class |
IntSquareMatrix.Type
type
|
C_AMP, C_APOS, C_ATSIGN, C_BACKSLASH, C_BACKSPACE, C_CARET, C_COLON, C_COMMA, C_DEL, C_DOLLAR, C_EQUALS, C_FORMFEED, C_HASH, C_LANGLE, C_LBRAK, C_LCURLY, C_LSQUARE, C_MINUS, C_NBSP, C_NEWLINE, C_NL, C_PERCENT, C_PERIOD, C_PIPE, C_PLUS, C_POUND, C_QUERY, C_QUOT, C_RANGLE, C_RBRAK, C_RCURLY, C_RETURN, C_RSQUARE, C_SEMICOLON, C_SHRIEK, C_SLASH, C_SPACE, C_STAR, C_TAB, C_TILDE, C_UNDER, EPS, F_S, NONWHITEPUNC, NONWHITEPUNC0, NONWHITEPUNC0REGEX, ONE_THIRD, PUNC, S_AMP, S_APOS, S_ATSIGN, S_BACKSLASH, S_CARET, S_COLON, S_COMMA, S_DOLLAR, S_EMPTY, S_EQUALS, S_FORMFEED, S_HASH, S_LANGLE, S_LBRAK, S_LCURLY, S_LSQUARE, S_MINUS, S_NEWLINE, S_NL, S_PERCENT, S_PERIOD, S_PIPE, S_PLUS, S_POUND, S_QUERY, S_QUOT, S_RANGLE, S_RBRAK, S_RCURLY, S_RETURN, S_RSQUARE, S_SEMICOLON, S_SHRIEK, S_SLASH, S_SPACE, S_STAR, S_TAB, S_TILDE, S_UNDER, S_WHITEREGEX, TWO_THIRDS, U_S, WHITESPACE| Constructor and Description |
|---|
IntSquareMatrix()
Constructor.
|
IntSquareMatrix(int rows)
Constructor.
|
IntSquareMatrix(int[][] matrix)
constructor from array.
|
IntSquareMatrix(int rows,
int f)
Creates real square matrix with all elements initialized to int value.
|
IntSquareMatrix(int rows,
int[] array)
Creates real square matrix from array THE COLUMN IS THE FASTEST MOVING
INDEX, that is the matrix is filled as mat(0,0), mat(0,1) ...
|
IntSquareMatrix(IntMatrix m)
shallow copy from IntMatrix
the array values are not copied (only the reference)
|
IntSquareMatrix(IntMatrix m,
int lowrow,
int lowcol,
int rows)
Constructor for submatrix of another matrix.
|
IntSquareMatrix(IntSquareMatrix m)
copy constructor.
|
| Modifier and Type | Method and Description |
|---|---|
IntSquareMatrix |
copyLowerToUpper()
copy lower triangle into upper triangle.
|
IntSquareMatrix |
copyUpperToLower()
copy upper triangle into lower triangle.
|
static IntSquareMatrix |
diagonal(IntArray f)
create diagonal matrix from real matrix.
|
boolean |
isEqualTo(IntSquareMatrix r)
are two matrices identical
|
boolean |
isLowerTriangular()
is matrix LowerTriangular.
|
boolean |
isSymmetric()
is matrix symmetric.
|
boolean |
isUnit()
is it a unit matrix.
|
boolean |
isUpperTriangular()
is matrix UpperTriangular.
|
IntArray |
lowerTriangle()
copy lower triangle into linear array; order: 0,0; 1,0; 1,1; 2,0
|
IntSquareMatrix |
multiply(IntSquareMatrix m)
matrix multiplication.
|
static IntSquareMatrix |
outerProduct(IntArray f)
Creates square matrix from real matrix.
|
IntSquareMatrix |
plus(IntSquareMatrix m)
matrix addition.
|
void |
shallowCopy(IntSquareMatrix m)
shallowCopy an existing square matrix.
|
IntSquareMatrix |
subtract(IntSquareMatrix m)
matrix subtraction.
|
int |
trace()
trace.
|
void |
transpose()
transpose.
|
appendColumnData, appendColumnData, appendRowData, appendRowData, checkNonEmptyMatrix, clearMatrix, columnwiseDivide, createByRows, deleteColumn, deleteColumns, deleteRow, deleteRows, elementAt, elementAt, elementsInRange, extractColumnData, extractColumns, extractRowData, extractRows, extractSubMatrixData, findLargestUniqueElementsInRowColumn, getCols, getFormat, getIntMatrix, getMatrix, getMatrixAsArray, getRows, getTranspose, indexOfLargestElement, indexOfLargestElementInColumn, indexOfLargestElementInRow, indexOfSmallestElement, indexOfSmallestElementInColumn, indexOfSmallestElementInRow, insertColumnData, insertColumnData, insertRowData, insertRowData, insertRows, isEqualTo, isOrthogonal, isSquare, largestElement, largestElementInColumn, largestElementInRow, makeSpaceForNewColumns, multiply, multiply, multiplyBy, multiplyEquals, negative, plus, reorderColumnsBy, reorderRowsBy, replaceColumnData, replaceColumnData, replaceColumnData, replaceRowData, replaceRowData, replaceRowData, replaceSubMatrixData, setAllElements, setElementAt, setFormat, shallowCopy, smallestElement, smallestElementInColumn, smallestElementInRow, subtract, toString, translateByColumn, writeXMLpublic IntSquareMatrix()
public IntSquareMatrix(int rows)
rows - number of rows and columns values are set to zeropublic IntSquareMatrix(int rows,
int[] array)
rows - the final rows and cols of real square matrixarray - of size (rows * rows)EuclidRuntimeException - array size must be multiple of rowspublic IntSquareMatrix(int rows,
int f)
rows - size of square matrixf - value of all elementspublic IntSquareMatrix(IntMatrix m, int lowrow, int lowcol, int rows) throws EuclidRuntimeException
m - matrix to slice (need not be square)lowrow - the start row inclusive (count from 0)lowcol - the start column inclusive (count from 0)rows - size of final matrixEuclidRuntimeExceptionpublic IntSquareMatrix(IntSquareMatrix m)
m - matrix to copypublic IntSquareMatrix(IntMatrix m) throws EuclidRuntimeException
m - matrix to copy reference fromEuclidRuntimeException - m must be square (that is cols = rows)public IntSquareMatrix(int[][] matrix)
throws EuclidRuntimeException
matrix - to copyEuclidRuntimeException - matrix is not square (might even not be
rectangular!)public static IntSquareMatrix outerProduct(IntArray f)
f - real array (length rows) multiplied to give outer productpublic static IntSquareMatrix diagonal(IntArray f)
f - real array (length rows)public void shallowCopy(IntSquareMatrix m) throws EuclidRuntimeException
m - matrix to shallow copyEuclidRuntimeException - m must have the same number of rows and cols as
thispublic boolean isEqualTo(IntSquareMatrix r)
r - matrix to comparepublic IntSquareMatrix plus(IntSquareMatrix m) throws EuclidRuntimeException
m - matrix to addEuclidRuntimeException - m must have the same number of rows and cols as
thispublic IntSquareMatrix subtract(IntSquareMatrix m) throws EuclidRuntimeException
m - matrix to subtract from thisEuclidRuntimeException - m must have the same number of rows and cols as
thispublic IntSquareMatrix multiply(IntSquareMatrix m) throws EuclidRuntimeException
this*m m - matrix to multiply byEuclidRuntimeException - m must have the same number of rows as this
has colspublic int trace()
public boolean isUnit()
public boolean isSymmetric()
public boolean isUpperTriangular()
public boolean isLowerTriangular()
public IntSquareMatrix copyUpperToLower()
public IntSquareMatrix copyLowerToUpper()
public IntArray lowerTriangle()
public void transpose()
Copyright © 1994–2024 Peter Murray-Rust. All rights reserved.