Assembly: Extreme.Numerics (Extreme.Numerics)
Syntax
| Visual Basic (Declaration) |
|---|
Public MustInherit Class Matrix _ Inherits LinearTransformation _ Implements IFormattable |
| C# |
|---|
public abstract class Matrix : LinearTransformation, IFormattable |
| C++ |
|---|
public ref class Matrix abstract : public LinearTransformation, IFormattable |
Methods
| Icon | Type | Description |
|---|---|---|
| Add(Matrix, Matrix) |
Adds two Matrix objects.
| |
| Add(TransposeOperation, TransposeOperation, Double, Matrix) |
Adds a multiple of a Matrix to this Matrix and returns
the result.
| |
| Addition(Matrix, Matrix) |
Adds two Matrix objects.
| |
| AddProductToVector(Double, Vector, TransposeOperation, Double, GeneralVector) | ||
| ApplyToColumns(MultivariateRealFunction) |
Applies a function to each column in a matrix and returns the result as a vector.
| |
| ApplyToRows(MultivariateRealFunction) |
Applies a function to each column in a matrix and returns the result as a vector.
| |
| Clone() |
Constructs a deep copy of this Matrix.
| |
| CloneData() |
Gives this instance its own copy of its elements.
| |
| ComponentwiseDivide(Matrix, Matrix) |
Divides the components of a Matrix by the corresponding
components of another matrix.
| |
| ComponentwiseDivide(Matrix) |
Divides the components of this instance by the corresponding
components of another matrix.
| |
| ComponentwiseMultiply(Matrix, Matrix) |
Multiplies the components of a Matrix by the corresponding
components of another matrix.
| |
| ComponentwiseMultiply(Matrix) |
Multiplies the components of this instance by the corresponding
components of another matrix.
| |
| CopyTo(Matrix) |
Copies the components of this Matrix
to another matrix.
| |
| Divide(Matrix, Double) |
Divides a Matrix by a scalar.
| |
| Division(Matrix, Double) |
Divides a Matrix by a scalar.
| |
| Equality(Matrix, Matrix) |
Returns a value indicating whether two instances
of Matrix are equal.
| |
| Equals(Object) |
Determines whether the specified Object
is equal to the current Matrix.
| |
| EstimateConditionNumber() |
Calculates an estimate for the condition
number of this Matrix.
| |
| Finalize() | ||
| FrobeniusNorm() |
Returns the Frobenius norm of this Matrix.
| |
| GetColumn(Int32) |
Returns a column Vector for this instance
that points at the specified column.
| |
| GetColumn(Int32, Int32, Int32) |
Returns a column Vector for this instance
starting at the specified column and row and of the
specified length.
| |
| GetColumn(Int32, Int32, Int32, Int32) |
Returns a column Vector for this instance
starting at the specified column and row and of the
specified length.
| |
| GetColumn(Int32, Range) |
Returns a column Vector for this instance
starting at the specified column and row and of the
specified length.
| |
| GetColumnEnumerator() |
Gets an IEnumerator than can be used to enumerate
the columns of this Matrix.
| |
| GetColumnSums() |
Returns the sums of the components of each column of the matrix.
| |
| GetComponents() |
Gets the components of the Vector.
| |
| GetComponents(MatrixElementOrder) |
Gets the components of the Vector.
| |
| GetConditionNumber() |
Calculates the condition
number of this Matrix.
| |
| GetDeterminant() |
Calculates the determinant of this Matrix.
| |
| GetDiagonal() |
Gets a Vector view of the diagonal elements
of this instance.
| |
| GetDiagonal(Int32) |
Gets a Vector view of the specified diagonal
of this instance.
| |
| GetHashCode() |
Returns the hash code for this instance.
| |
| GetInverse() |
Calculates the inverse of this Matrix.
| |
| GetObjectData(SerializationInfo, StreamingContext) |
Populates a SerializationInfo with the data
needed to serialize the target object.
| |
| GetPseudoInverse() |
Calculates the Moore-Penrose pseudo-inverse of this Matrix.
| |
| GetRow(Int32) |
Returns a row Vector for this instance
that points at the specified row.
| |
| GetRow(Int32, Int32, Int32) |
Returns a row Vector for this instance
over the specified range.
| |
| GetRow(Int32, Range) |
Returns a row Vector for this instance
starting at the specified row and column and of the
specified length.
| |
| GetRow(Int32, Int32, Int32, Int32) |
Returns a row Vector for this instance
starting at the specified row and column and of the
specified length.
| |
| GetRowEnumerator() |
Returns an IEnumerator instance that allows you to
enumerate the rows of this Matrix.
| |
| GetRowSums() |
Returns the sums of the components of each row of the matrix.
| |
| GetSingularValues() |
Gets a vector containing the singular values of the matrix.
| |
| GetSubmatrix(Range, Range, TransposeOperation) |
Gets a Matrix that is a submatrix of
this Matrix.
| |
| GetSubmatrix(Range, Range) |
Gets a Matrix that is a submatrix of
this Matrix.
| |
| GetSubmatrix(Int32, Int32, Int32, Int32) |
Gets a Matrix that is a submatrix of
this Matrix.
| |
| GetSubmatrix(Int32, Int32, Int32, Int32, Int32, Int32, TransposeOperation) |
Gets a Matrix that is a submatrix of
this Matrix.
| |
| GetType() | Gets the Type of the current instance. | |
| GetValue(Int32, Int32) |
Gets the matrix component at the specified position.
| |
| Inequality(Matrix, Matrix) |
Returns a value indicating whether two instances
of Matrix are not equal.
| |
| InfinityNorm() |
Returns the infinity norm of this Matrix.
| |
| IsComponentWritable(Int32, Int32) |
Returns a value that indicates whether the value of the component at
the specified row and column can be changed.
| |
| IsSingular() |
Gets a value indicating whether this matrix is singular.
| |
| MemberwiseClone() | Creates a shallow copy of the current Object. | |
| Multiply(Double) |
Multiplies this Matrix by a scalar factor.
| |
| Multiply(MatrixOperationSide, TransposeOperation, TransposeOperation, Matrix) |
Multiplies this Matrix by another matrix and returns
the result.
| |
| Multiply(Matrix, Matrix) |
Multiplies two Matrix objects.
| |
| Multiply(Matrix, Vector) |
Multiplies a Vector by a
Matrix.
| |
| Multiply(Double, Matrix) |
Multiplies a Matrix by a scalar.
| |
| Multiply(Vector, Matrix) |
Multiplies a Vector by a
Matrix.
| |
| Multiply(Vector, Matrix) |
Multiplies a Vector by a
Matrix.
| |
| Multiply(Matrix, Matrix) |
Multiplies two Matrix objects.
| |
| Multiply(Matrix, Vector) |
Multiplies a Vector by a
Matrix.
| |
| Multiply(Matrix, Double) |
Multiplies a Matrix by a scalar.
| |
| Multiply(Double, Matrix) |
Multiplies a Matrix by a scalar.
| |
| NormInternal(Char) |
Calculates a matrix norm.
| |
| OneNorm() |
Returns the 1-norm of this Matrix.
| |
| Rank(Double) |
Returns the numerical rank of a matrix using the specified tolerance.
| |
| ScaleColumns(Vector) |
Scales the columns of the matrix by the values specified by a vector.
| |
| ScaleRows(Vector) |
Scales the rows of the matrix by the values specified by a vector.
| |
| SetToZero() |
Sets all elements of the matrix to zero.
| |
| SetValue(Double, Int32, Int32) |
Sets the matrix component at the specified position to the specified value.
| |
| ShallowCopy() |
Makes a shallow copy of this Matrix.
| |
| Solve(GeneralVector, Boolean) |
Solves the system of simultaneous linear equations for the specified
right-hand side Vector.
| |
| Solve(GeneralMatrix, Boolean) |
Solves the system of simultaneous linear equations for the specified
right-hand side GeneralMatrix and overwrites the
right-hand side with the solution.
| |
| Solve(Vector) |
Solves the system of linear equations for the specified
right-hand side Vector.
| |
| Solve(Matrix) |
Solves the system of linear equations for the specified
right-hand side Matrix.
| |
| Subtract(Matrix, Matrix) |
Subtracts two Matrix objects.
| |
| Subtraction(Matrix, Matrix) |
Subtracts two Matrix objects.
| |
| ToGeneralMatrix() |
Makes a copy of this instance and returns it as a
GeneralMatrix.
| |
| ToString() |
Returns a String representation of this
Matrix.
| |
| ToString(String) |
Returns a String representation of this
Matrix.
| |
| ToString(String, IFormatProvider) |
Returns a String representation of this
Matrix.
| |
| Trace() |
Gets the sum of the diagonal elements of this
Matrix.
| |
| Transpose() |
Returns the transpose of this instance.
| |
| TwoNorm() |
Returns the two-norm of this Matrix.
| |
| UnscaleColumns(Vector) |
Scales the columns of the matrix by the inverse of the values specified by a vector.
| |
| UnscaleRows(Vector) |
Scales the rows of the matrix by the inverse of the values specified by a vector.
|
Constructors
| Icon | Type | Description |
|---|---|---|
| MatrixNew(Int32, Int32) |
Constructs a new Matrix of the specified
dimensions using the specified data array.
| |
| MatrixNew(SerializationInfo, StreamingContext) |
Constructs a new Matrix from serialization
data.
|
Properties
| Icon | Type | Description |
|---|---|---|
| ColumnCount |
Gets the number of columns in the Matrix.
| |
| Columns |
Gets the ColumnCollection for this instance.
| |
| ElementOrder |
Gets a value indicating the order in which the matrix
elements are stored.
| |
| Item(Int32, Int32) |
Gets or sets the specified element in this
Matrix.
| |
| Item(Int32, Range) |
Gets or sets the components of a row of this Matrix.
| |
| Item(Range, Range) |
Gets or sets the components of a submatrix of this Matrix.
| |
| Item(Range, Int32) |
Gets or sets the components of a column of this Matrix.
| |
| RowCount |
Gets the number of rows in the Matrix.
| |
| Rows |
Gets the RowCollection for this instance.
|
Remarks
The Matrix class provides methods and properties for all the common operations on matrices, including arithmetic operations, calculating norms and solving systems of simultaneous linear equations. Various methods allow you to access individual components as well as rows and columns and submatrices.
Since Matrix is an abstract base class and cannot be instantiated directly. Instead, use one of its derived classes. These are:
| Class | Description |
|---|---|
| GeneralMatrix | Represents a general, dense, square or rectangular matrix. |
| TriangularMatrix | Represents an upper or lower-triangular matrix, a matrix whose elements below or above the main diagonal are zero. |
| SymmetricMatrix | Represents a square matrix whose elements are symmetrical around the main diagonal. |
Note that the specialized classes exploit certain structural properties to perform many calculations more quickly than the general algorithms implemented by Matrix.
Matrix provides an indexer property. For convenient access to the rows or columns of a Matrix or parts thereof, use the GetRow(Int32) and GetColumn(Int32) methods.
Overloaded versions of the major arithmetic operators are provided for languages that support them. For languages that don't support operator overloading, equivalent staticSharedstatic methods are supplied.
Many matrix decompositions exist, serving a variety of purposes. Each of them has its own class. In this release the LUDecomposition and the QRDecomposition are supported. For positive-definite SymmetricMatrix, the CholeskyDecomposition is available.
Inheritance Hierarchy
Extreme.Mathematics.LinearAlgebra.LinearTransformation
Extreme.Mathematics.LinearAlgebra.Matrix