Matrix
use Matrix;
use Matrix qw(:all);
Matrix class provides the following methods:
new, AddColumnValues, AddRowValues, Copy, GetColumnValues, GetColumnValuesAsColumnMatrix, GetColumnValuesAsRowMatrix, GetColumnValuesAsString, GetColumnValuesAsVector, GetDiagonalValues, GetDiagonalValuesAsColumnMatrix, GetDiagonalValuesAsRowMatrix, GetDiagonalValuesAsString, GetDiagonalValuesAsVector, GetDimension, GetMatrixValuesReference, GetNumOfColumns, GetNumOfRows, GetRowValues, GetRowValuesAsColumnMatrix, GetRowValuesAsRowMatrix, GetRowValuesAsString, GetRowValuesAsVector, GetSize, GetValue, IdentityMatrix, IsAntiSymmetric, IsBiDiagonal, IsDiagonal, IsIdentity, IsLeftTriangular, IsLowerBiDiagonal, IsLowerTriangular, IsLowerUniTriangular, IsMatrix, IsNegative, IsPositive, IsRightTriangular, IsSkewSymmetric, IsSquare, IsStrictlyLowerTriangular, IsStrictlyUpperTriangular, IsSymmetric, IsTriDiagonal, IsUnit, IsUnitLowerTriangular, IsUnitUpperTriangular, IsUpperBiDiagonal, IsUpperTriangular, IsUpperUniTriangular, NewFromColumns, NewFromDiagonal, NewFromRows, One, SetAllValues, SetColumnValues, SetDiagonalValues, SetMatrixPrintStyle, SetRowValues, SetValue, SetValuePrintFormat, StringifyMatrix, Transpose, UnitMatrix, Zero, ZeroMatrix
The following functions are available:
IsMatrix, IdentityMatrix, NewFromRows, NewFromColumns, NewFromDiagonal, UnitMatrix, ZeroMatrix
The following operators are overloaded:
The matrix row and column indicies start from zero.
Creates a new Matrix of size NumOfRows x NumOfCol and returns NewMatrix object.
Adds column values to Matrix using an array, reference to an array, another vector, or space delimited value string and returns Matrix.
Adds row values to Matrix using an array, reference to an array, another vector, or space delimited value string and returns Matrix.
Creates a copy of Matrix and returns NewMatrix.
Returns an array containing column value specified using ColIndex with column index starting at 0. In scalar context, number of column values is returned.
Returns a new ColumnMatrix containing column values specified using ColIndex with column index starting at 0.
Returns a new RowMatrix containing column values specified using ColIndex with column index starting at 0.
Returns a space delimited ColumnValuesString column values specified using ColIndex with column index starting at 0.
Returns a new ColumnVector column values specified using RowIndex with column index starting at 0.
Returns an array containing diagonal values. In scalar context, number of diagonal values is returned.
Returns a new ColumnMatrix containing diagonal values corresponding to Matrix.
Returns a new RowMatrix containing diagonal values corresponding to Matrix.
Returns a space delimited DiagonalValuesString containing diagonal values corresponding to Matrix.
Returns a new DiagonalVector containing diagonal values corresponding to Matrix.
Returns size of Matrix.
Returns a reference to array containing rows and column values corresponding to Matrix.
Returns NumOfCols in Matrix.
Returns NumOfRows in Matrix.
Returns an array containing row value specified using RowIndex with row index starting at 0. In scalar context, number of row values is returned.
Returns a new ColumnMatrix containing row values specified using RowIndex with column index starting at 0.
Returns a new RowMatrix containing row values specified using RowIndex with row index starting at 0.
Returns a space delimited RowValuesString row values specified using RowIndex with row index starting at 0.
Returns a new RowVector row values specified using RowIndex with row index starting at 0.
Returns size of Matrix.
Returns Value of Matrix element specified using RowIndex and ColIndex with indicies starting at 0 with optional validation of specified index values.
Creates a new IdentityMatrix of specified size NumOfRows x NumOfCol or of size 3 x 3 and returns NewIdentityMatrix object.
Returns 1 or 0 based on whether Matrix is an anti symmetric matrix.
A matrix is an anti symmetric matrix:
Transpose of an anti symmetric matrix equals the negative of the matrix.
Returns 1 or 0 based on whether Matrix is upper or lower bidiagonal matrix.
Returns 1 or 0 based on whether Matrix is a diagonal matrix.
A matrix is a diagonal matrix:
Returns 1 or 0 based on whether Matrix is an identity matrix.
Returns 1 or 0 based on whether Matrix is a left or lower matrix.
A matrix is a left triangular matrix:
Returns 1 or 0 based on whether Matrix is a lower bidiagonal matrix.
A matrix is a lower bidiagonal matrix:
Returns 1 or 0 based on whether Matrix is a left or lower triangular matrix.
A matrix is a lower triangular matrix:
Returns 1 or 0 based on whether Matrix is a lower triangular matrix.
Returns 1 or 0 based on whether Object is a Matrix object.
Returns 1 or 0 based on whether Matrix is a negative matrix containing only values less than or equal to zero.
Returns 1 or 0 based on whether Matrix is a negative matrix containing only values greater than or equal to zero.
Returns 1 or 0 based on whether Matrix is a right or upper triangular matrix.
Returns 1 or 0 based on whether Matrix is a skew or anti symmetric matrix.
Returns 1 or 0 based on whether Matrix is a square matrix containing equal number of rows and columns.
Returns 1 or 0 based on whether Matrix is a strictly lower triangular matrix.
A matrix is a strictly lower triangular matrix:
Returns 1 or 0 based on whether Matrix is a strictly upper triangular matrix.
A matrix is a strictly upper triangular matrix:
Returns 1 or 0 based on whether Matrix is a symmetric matrix.
A matrix is a symmetric matrix:
Transpose of a symmetric matrix equals the matrix itself.
Returns 1 or 0 based on whether Matrix is a tridiagonal matrix.
A matrix is a tribidiagonal matrix:
Returns 1 or 0 based on whether Matrix is a unit matrix.
A matrix is a unit matrix:
Returns 1 or 0 based on whether Matrix is an unit lower triangular matrix.
A matrix is an unit lower triangular matrix:
Returns 1 or 0 based on whether Matrix is an unit upper triangular matrix.
A matrix is an unit upper triangular matrix:
Returns 1 or 0 based on whether Matrix is an upper bidiagonal matrix.
A matrix is an upper bidiagonal matrix:
Returns 1 or 0 based on whether Matrix is a right or upper triangular matrix.
A matrix is an upper triangular matrix:
Returns 1 or 0 based on whether Matrix is a right or upper triangular matrix.
Creates a new Matrix using specified column values and returns NewMatrix object.
The column values can be specified in one of the following formats:
Each column must contain the same number of values.
Creates a new Matrix using specified diagonal values and returns NewMatrix object.
The column values can be specified in one of the following formats:
Creates a new Matrix using specified row values and returns NewMatrix object.
The row values can be specified in one of the following formats:
Each row must contain the same number of values.
Sets values of all Matrix elements to 1 and returns Matrix.
Sets values of all Matrix elements to specified Value and returns Matrix.
Sets column values of a specified ColIndex of Matrix using an array, reference to an array, another vector, or space delimited value string and returns Matrix.
Sets values of the diagonal in square Matrix and returns Matrix.
Sets print style for matrix rows for an individual object or the whole class during StringifyMatrix operation. Possible MatrixStyle values: AllRowsInOneLine, OneRowPerLine. Default: AllRowsInOneLine.
Sets row values of a specified RowIndex of Matrix using an array, reference to an array, another vector, or space delimited value string and returns Matrix.
Sets Value of Matrix element specified using RowIndex and ColIndex with indicies starting at 0 with optional validation of specified index values and return Matrix.
Sets value print format for an individual object or the whole class during StringifyMatrix operation and returns Matrix.
Returns a string containing information about Matrix object.
Transposes Matrix by swaping rows with columns and returns Matrix.
Creates a new UnitMatrix of specified size NumOfRows x NumOfCol or of size 3 x 3 and returns NewUnitMatrix object.
Sets values of all Matrix elements to 0 and returns Matrix.
Creates a new ZeroMatrix of specified size NumOfRows x NumOfCol or of size 3 x 3 and returns NewZeroMatrix object.
Copyright (C) 2024 Manish Sud. All rights reserved.
This file is part of MayaChemTools.
MayaChemTools is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.