Represents a general, dense, square or rectangular Matrix.

Namespace: Extreme.Mathematics.LinearAlgebra
Assembly: Extreme.Numerics (Extreme.Numerics)

Syntax

Visual Basic (Declaration)
Public Class GeneralMatrix _
	Inherits Matrix _
	Implements ISerializable, IDoubleStorage
C#
public class GeneralMatrix : Matrix, ISerializable, IDoubleStorage
C++
public ref class GeneralMatrix : public Matrix, ISerializable, IDoubleStorage

Methods

IconTypeDescription
Add(Matrix)
Adds a Matrix to this GeneralMatrix.
Add(Double, Matrix)
Adds a multiple of a Matrix to this GeneralMatrix.
static memberAdd(GeneralMatrix, GeneralMatrix)
Adds two GeneralMatrix objects and returns the result.
static memberAdd(GeneralMatrix, Double, GeneralMatrix, GeneralMatrix)
Adds two GeneralMatrix objects and stores the result in a third GeneralMatrix.
Add(TransposeOperation, TransposeOperation, Double, Matrix)
Adds a multiple of a Matrix to this Matrix and returns the result.
AddOuterProduct(Vector)
Updates a matrix with the outer product of a Vector and itself.
AddOuterProduct(Double, Vector, Vector)
Updates a matrix with the scaled outer product of two vectors.
AddOuterProduct(Double, Vector)
Updates a matrix with the scaled outer product of a Vector and itself.
AddProduct(GeneralMatrix, GeneralMatrix)
Adds the product of two GeneralMatrix objects to this GeneralMatrix.
AddProduct(Double, GeneralMatrix, GeneralMatrix)
Adds a multiple of the product of two GeneralMatrix object to this GeneralMatrix.
AddProductToVector(Double, Vector, TransposeOperation, Double, GeneralVector)
Multiplies a Vector by this Matrix and stores the result in a second Vector.
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.
CloneData(MatrixElementOrder)
Gives this instance its own copy of its elements.
ComponentwiseDivide(Matrix)
Divides the components of this instance 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.
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()
Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
FrobeniusNorm()
Returns the Frobenius norm of this Matrix.
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)
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, 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 GeneralMatrix.
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(Int32)
Gets a Vector view of the specified diagonal of this instance.
GetHashCode()
Returns the hash code for this instance.
static memberGetIdentity(Int32)
Returns an identity matrix of the specified dimension.
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, Int32, Int32, Int32)
Returns a row Vector for this instance starting at the specified row and column and of the specified length.
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.
GetRowEnumerator()
Constructs an IEnumerator object that can be used to enumerate the rows of this GeneralMatrix.
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(Int32, Int32, Int32, Int32, Int32, Int32, TransposeOperation)
Gets a GeneralMatrix that is a submatrix of this 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.
GetType()
Gets the Type of the current instance.
GetValue(Int32, Int32)
Gets the matrix component at the specified position.
InfinityNorm()
Returns the infinity norm of this Matrix.
IsComponentWritable(Int32, Int32)
Gets a value indicating 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(Matrix)
Multiplies this GeneralMatrix on the right by a Matrix.
Multiply(Double)
Multiplies this Matrix by a scalar factor.
Multiply(MatrixOperationSide, TransposeOperation, TransposeOperation, Matrix)
Multiplies this Matrix by another matrix and returns the result.
static memberMultiply(GeneralMatrix, GeneralMatrix)
Multiplies two Matrix objects.
static memberMultiply(GeneralMatrix, GeneralMatrix, GeneralMatrix)
Multiplies two GeneralMatrix objects and stores the result in a third GeneralMatrix.
MultiplyByTranspose()
Multiplies this GeneralMatrix by its Transpose().
NormInternal(Char)
Calculates a matrix norm.
OneNorm()
Returns the 1-norm of this Matrix.
PreMultiply(Matrix)
Multiplies this GeneralMatrix on the left by a 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.
static memberSubtract(GeneralMatrix, GeneralMatrix)
Subtracts two GeneralMatrix objects.
static memberSubtract(GeneralMatrix, GeneralMatrix, GeneralMatrix)
Subtracts two GeneralMatrix objects and stores the result in a third GeneralMatrix.
SubtractProduct(GeneralMatrix, GeneralMatrix)
Subtracts the product of two GeneralMatrix object to this GeneralMatrix.
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

IconTypeDescription
GeneralMatrixNew(Int32, Int32)
Constructs a new GeneralMatrix with the specified number of rows and columns
GeneralMatrixNew(Int32, Int32, MatrixElementOrder)
Constructs a new GeneralMatrix with the specified number of rows and columns
GeneralMatrixNew(Double[,,,,,](,,,,,))
Constructs a new GeneralMatrix from a two-dimensional array.
GeneralMatrixNew(SerializationInfo, StreamingContext)
Constructs a new GeneralMatrix from serialization data.
GeneralMatrixNew(Int32, Int32, Double[]())
Constructs a new GeneralMatrix of the specified dimensions using the specified data array.
GeneralMatrixNew(Int32, Int32, Double[](), Boolean)
Constructs a new GeneralMatrix of the specified dimensions using the specified data array.
GeneralMatrixNew(Int32, Int32, Double[](), MatrixElementOrder)
Constructs a new GeneralMatrix of the specified dimensions using the specified data array.
GeneralMatrixNew(Int32, Int32, Double[](), MatrixElementOrder, Boolean)
Constructs a new GeneralMatrix of the specified dimensions using the specified data array.
GeneralMatrixNew(Int32, Int32, Double)
Constructs a new GeneralMatrix with the specified number of rows and columns whose elements are all equal to the specified value.

Properties

IconTypeDescription
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.
StorageArray
Gets the Double array that stores the data for the instance.
StorageIncrement
Gets the increment between successive elements of this instance in the StorageArray.
StorageOffset
Gets the index of the first element of this instance in the StorageArray.

Remarks

A matrix is a two-dimensional array of real numbers. Use the GeneralMatrix class to represent general, dense matrices. It is the most general implementation of the Matrix class. No components are assumed to have a specific value, and no relationship is assumed to exist between different components.

The components of a GeneralMatrix are stored in a one-dimensional array of Double values. By default, components that are adjacent in a column of the matrix are adjacent in the storage array. The components are said to be stored in column major order. It is also possible to have elements stored in row major order.

The GeneralMatrix class implements algorithms using the general matrix BLAS and LAPACK routines. These routines assume matrix components are stored in column major order. However, any necessary conversions are performed transparantly. No additional work is needed. In some cases there might be a small performance penalty.

Because GeneralMatrix can represent any matrix, it is often used as the return type of matrix operations.

Inheritance Hierarchy

See Also