Click or drag to resize

DoubleSymmetricMatrix Class

Class DoubleSymmetricMatrix represents a symmetric matrix of double-precision floating point values.
Inheritance Hierarchy

Namespace:  CenterSpace.NMath.Core
Assembly:  NMath (in NMath.dll) Version: 7.4
Syntax
[SerializableAttribute]
public class DoubleSymmetricMatrix : ICloneable

The DoubleSymmetricMatrix type exposes the following members.

Constructors
  NameDescription
Public methodDoubleSymmetricMatrix(Int32)
Constructs a DoubleSymmetricMatrix instance with the specified size.
Public methodDoubleSymmetricMatrix(DoubleMatrix)
Constructs a square DoubleSymmetricMatrix instance by extracting the upper triangular part of a square general matrix.
Public methodDoubleSymmetricMatrix(DoubleVector)
Constructs a DoubleSymmetricMatrix instance using the data in the given vector.
Public methodDoubleSymmetricMatrix(DoubleVector, Int32)
Constructs a DoubleSymmetricMatrix instance with the specified size, and using the data in the given vector.
Top
Properties
  NameDescription
Public propertyCols
Gets the number of columns in the matrix.
Public propertyDataVector
Gets the data vector referenced by this matrix.
Public propertyItem
Gets and sets the value at the specified position. Symmetry is maintained.
Public propertyOrder
Gets the order of the matrix.
Public propertyRows
Gets the number of rows in the matrix.
Top
Methods
  NameDescription
Public methodStatic memberAdd(Double, DoubleSymmetricMatrix)
Adds a scalar and a symmetric matrix.
Public methodStatic memberAdd(DoubleSymmetricMatrix, DoubleSymmetricMatrix)
Adds two symmetric matrices.
Public methodStatic memberAdd(DoubleSymmetricMatrix, Double)
Adds a symmetric matrix and a scalar.
Public methodApply(FuncDouble, Double)
Returns a new matrix with the same size as this matrix, whose values are the result of applying the given unary function to each element of this matrix.
Public methodApply(FuncDoubleVector, Double)
Returns a new vector containing an element for each column or row in this matrix. The elements are the results of applying a function that takes a vector and returns a single-precision number.
Public methodApply(FuncDouble, Double, Double, DoubleSymmetricMatrix)
Returns a new matrix with the same size as this matrix, whose values are the result of applying the given binary function to each element of this matrix. The first parameter to the binary function is the matrix element; the second parameter is the corresponding element of the passed matrix.
Public methodApply(FuncDouble, Double, Double, Double)
Returns a new matrix with the same size as this matrix, whose values are the result of applying the given binary function to each element of this matrix. The first parameter to the binary function is the matrix element; the second parameter is the passed float-precision value.
Public methodApply(FuncDouble, Int32, Double, Int32)
Returns a new matrix with the same size as this matrix, whose values are the result of applying the given binary function to each element of this matrix. The first parameter to the binary function is the matrix element; the second parameter is the passed integer value.
Public methodClone
Creates a deep copy of this matrix.
Public methodDeepenThisCopy
Guarantees that there is only one reference to the underlying data and that this data is in contiguous storage.
Public methodStatic memberDivide(Double, DoubleSymmetricMatrix)
Divide a scalar by a symmetric matrix.
Public methodStatic memberDivide(DoubleSymmetricMatrix, DoubleSymmetricMatrix)
Divide a symmetric matrix by another.
Public methodStatic memberDivide(DoubleSymmetricMatrix, Double)
Divide a symmetric matrix by a scalar.
Public methodEquals
Tests for equality of this matrix and another matrix. Two matrices are equal if they have the same dimensions and all values are equal.
(Overrides ObjectEquals(Object).)
Public methodGetHashCode
Returns an integer hash code for this matrix.
(Overrides ObjectGetHashCode.)
Public methodLeadingSubmatrix
Returns the k by k upper left corner of the matrix. The matrix and the submatrix share the same data.
Public methodStatic memberMultiply(Double, DoubleSymmetricMatrix)
Multiply a scalar and a symmetric matrix.
Public methodStatic memberMultiply(DoubleSymmetricMatrix, DoubleSymmetricMatrix)
Multiply two lower symmetric matrices.
Public methodStatic memberMultiply(DoubleSymmetricMatrix, Double)
Multiply a symmetric matrix and a scalar.
Public methodStatic memberNegate
Negation operator.
Public methodResize
Changes the order of this matrix to that specified, adding zeros or truncating as necessary.
Public methodShallowCopy
Creates a shallow copy of this matrix.
Public methodStatic memberSubtract(Double, DoubleSymmetricMatrix)
Subtracts a symmetric matrix from a scalar.
Public methodStatic memberSubtract(DoubleSymmetricMatrix, DoubleSymmetricMatrix)
Subtracts one symmetric matrix from another.
Public methodStatic memberSubtract(DoubleSymmetricMatrix, Double)
Subtracts a scalar from a symmetric matrix.
Public methodCode exampleToCommaSeparated
Returns a formatted string representation of this matrix using commas and newlines.
Public methodCode exampleToCommaSeparated(String)
Returns a formatted string representation of this matrix using commas and newlines. Numbers are formatted using the specified format string.
Public methodToGeneralMatrix
Converts this sparse matrix to a general matrix.
Public methodCode exampleToString (Overrides ObjectToString.)
Public methodCode exampleToString(String)
Public methodCode exampleToTabDelimited
Returns a formatted string representation of this matrix using tabs and newlines.
Public methodCode exampleToTabDelimited(String)
Returns a formatted string representation of this matrix using tabs and newlines. Numbers are formatted using the specified format string.
Public methodTransform(FuncDouble, Double)
Modifies the elements of this matrix by applying the given unary function to each element.
Public methodTransform(FuncDouble, Double, Double, DoubleSymmetricMatrix)
Modifies the contents of this matrix by applying the given binary function to each element. The first parameter to the binary function is the matrix element; the second parameter is the corresponding element of the passed matrix.
Public methodTransform(FuncDouble, Double, Double, Double)
Modifies the contents of this matrix by applying the given binary function to each element. The first parameter to the binary function is the matrix element; the second parameter is the passed float-precision value.
Public methodTransform(FuncDouble, Int32, Double, Int32)
Modifies the contents of this matrix by applying the given binary function to each element. The first parameter to the binary function is the matrix element; the second parameter is the passed integer value.
Public methodTranspose
Returns this matrix.
Top
Operators
  NameDescription
Public operatorStatic memberAddition(Double, DoubleSymmetricMatrix)
Adds a scalar and a symmetric matrix.
Public operatorStatic memberAddition(DoubleSymmetricMatrix, DoubleSymmetricMatrix)
Adds two symmetric matrices.
Public operatorStatic memberAddition(DoubleSymmetricMatrix, Double)
Adds a symmetric matrix and a scalar.
Public operatorStatic memberDecrement
Decrements each element of the given matrix.
Public operatorStatic memberDivision(Double, DoubleSymmetricMatrix)
Divide a scalar by a symmetric matrix.
Public operatorStatic memberDivision(DoubleSymmetricMatrix, DoubleSymmetricMatrix)
Divide a symmetric matrix by another.
Public operatorStatic memberDivision(DoubleSymmetricMatrix, Double)
Divide a symmetric matrix by a scalar.
Public operatorStatic memberEquality
Tests for equality of two symmetric matrices. Two matrices are equal if they have the same order and all values are equal.
Public operatorStatic member(FloatSymmetricMatrix to DoubleSymmetricMatrix)
Implicitly converts a FloatSymmetricMatrix instance into a DoubleSymmetricMatrix instance.
Public operatorStatic memberIncrement
Increments each element of the given matrix.
Public operatorStatic memberInequality
Tests for inequality of two symmetric matrices. Two matrices are equal if they have the same order and all values are equal.
Public operatorStatic memberMultiply(Double, DoubleSymmetricMatrix)
Multiply a scalar and a symmetric matrix.
Public operatorStatic memberMultiply(DoubleSymmetricMatrix, DoubleSymmetricMatrix)
Multiply two lower symmetric matrices. Multiply two lower symmetric matrices.
Public operatorStatic memberMultiply(DoubleSymmetricMatrix, Double)
Multiply a symmetric matrix and a scalar.
Public operatorStatic memberSubtraction(Double, DoubleSymmetricMatrix)
Subtracts a symmetric matrix from a scalar.
Public operatorStatic memberSubtraction(DoubleSymmetricMatrix, DoubleSymmetricMatrix)
Subtracts one symmetric matrix from another.
Public operatorStatic memberSubtraction(DoubleSymmetricMatrix, Double)
Subtracts a scalar from a symmetric matrix.
Public operatorStatic memberUnaryNegation
Negation operator.
Public operatorStatic memberUnaryPlus
Unary + operator. Just returns the input matrix.
Top
Remarks
A symmetric matrix is equal to its transpose. In other words, A[i,j] = A[j,i] for all elements i,j in matrix A.
The matrix is stored in a vector column by column. For efficiency, only the upper triangle is stored. For example, the following 5 by 5 symmetric matrix:
    | a00 a01 a02 a03 a04 |
    | a10 a11 a12 a13 a14 |
A = | a20 a21 a22 a23 a24 |
    | a30 a31 a32 a33 a34 |
    | a40 a41 a42 a43 a44 |
is stored in a data vector v as:
v = [a00 a01 a11 a02 a12 a22 a03 a13 a23 a33 a04 a14 a24 a34 a44 ]
In general, A[i,j] = v[j(j+1)/2+i], i<=j v[i(i+1)/2+j], j<i
See Also