![](../icons/Help.png) | DoubleUpperTriMatrix Class |
Class DoubleUpperTriMatrix represents an upper triangular matrix of double-precision
floating point values. An upper triangular matrix is a square matrix with all elements
below the main diagonal equal to zero.
Inheritance Hierarchy Namespace: CenterSpace.NMath.CoreAssembly: NMath (in NMath.dll) Version: 7.4
Syntax[SerializableAttribute]
public class DoubleUpperTriMatrix : ICloneable
<SerializableAttribute>
Public Class DoubleUpperTriMatrix
Implements ICloneable
[SerializableAttribute]
public ref class DoubleUpperTriMatrix : ICloneable
[<SerializableAttribute>]
type DoubleUpperTriMatrix =
class
interface ICloneable
end
The DoubleUpperTriMatrix type exposes the following members.
Constructors
Properties | Name | Description |
---|
![Public property Public property](../icons/pubProperty.gif) | Cols |
Gets the number of columns in the matrix.
|
![Public property Public property](../icons/pubProperty.gif) | DataVector |
Gets the data vector referenced by this matrix.
|
![Public property Public property](../icons/pubProperty.gif) | Item |
Gets and sets the value at the specified position. Zero matrix elements
are not stored, so assigning a non-zero value to a matrix element
above the diagonal of the matrix raises an exception.
|
![Public property Public property](../icons/pubProperty.gif) | Order |
Gets the order of the matrix.
|
![Public property Public property](../icons/pubProperty.gif) | Rows |
Gets the number of rows in the matrix.
|
Top
Methods | Name | Description |
---|
![Public method Public method](../icons/pubMethod.gif) ![Static member Static member](../icons/Static.gif) | Add(Double, DoubleUpperTriMatrix) |
Adds a scalar and an upper triangular matrix.
|
![Public method Public method](../icons/pubMethod.gif) ![Static member Static member](../icons/Static.gif) | Add(DoubleUpperTriMatrix, DoubleUpperTriMatrix) |
Adds two upper triangular matrices.
|
![Public method Public method](../icons/pubMethod.gif) ![Static member Static member](../icons/Static.gif) | Add(DoubleUpperTriMatrix, Double) |
Adds an upper triangular matrix and a scalar.
|
![Public method Public method](../icons/pubMethod.gif) | Clone |
Creates a deep copy of this matrix.
|
![Public method Public method](../icons/pubMethod.gif) | DeepenThisCopy |
Guarantees that there is only one reference to the underlying
data and that this data is in contiguous storage.
|
![Public method Public method](../icons/pubMethod.gif) ![Static member Static member](../icons/Static.gif) | Divide(Double, DoubleUpperTriMatrix) |
Divide a scalar by an upper triangular matrix.
|
![Public method Public method](../icons/pubMethod.gif) ![Static member Static member](../icons/Static.gif) | Divide(DoubleUpperTriMatrix, DoubleUpperTriMatrix) |
Divide an upper triangular matrix by another.
|
![Public method Public method](../icons/pubMethod.gif) ![Static member Static member](../icons/Static.gif) | Divide(DoubleUpperTriMatrix, Double) |
Divide an upper triangular matrix by a scalar.
|
![Public method Public method](../icons/pubMethod.gif) | Equals |
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 method Public method](../icons/pubMethod.gif) | GetHashCode |
Returns an integer hash code for this matrix.
(Overrides ObjectGetHashCode) |
![Public method Public method](../icons/pubMethod.gif) | LeadingSubmatrix |
Returns the k by k upper left corner of the matrix. The
matrix and the submatrix share the same data.
|
![Public method Public method](../icons/pubMethod.gif) ![Static member Static member](../icons/Static.gif) | Multiply(Double, DoubleUpperTriMatrix) |
Multiply a scalar and an upper triangular matrix.
|
![Public method Public method](../icons/pubMethod.gif) ![Static member Static member](../icons/Static.gif) | Multiply(DoubleUpperTriMatrix, DoubleUpperTriMatrix) |
Multiply two upper triangular matrices.
|
![Public method Public method](../icons/pubMethod.gif) ![Static member Static member](../icons/Static.gif) | Multiply(DoubleUpperTriMatrix, Double) |
Multiply an upper triangular matrix and a scalar.
|
![Public method Public method](../icons/pubMethod.gif) ![Static member Static member](../icons/Static.gif) | Negate |
Negation operator.
|
![Public method Public method](../icons/pubMethod.gif) | OnDeserialized |
Checks that the matrix is square following deserialization
|
![Public method Public method](../icons/pubMethod.gif) | Resize |
Changes the order of this matrix to that specified, adding zeros or truncating as
necessary.
|
![Public method Public method](../icons/pubMethod.gif) | ShallowCopy |
Creates a shallow copy of this matrix.
|
![Public method Public method](../icons/pubMethod.gif) ![Static member Static member](../icons/Static.gif) | Subtract(Double, DoubleUpperTriMatrix) |
Subtracts an upper triangular matrix from a scalar.
|
![Public method Public method](../icons/pubMethod.gif) ![Static member Static member](../icons/Static.gif) | Subtract(DoubleUpperTriMatrix, DoubleUpperTriMatrix) |
Subtracts one upper triangular matrix from another.
|
![Public method Public method](../icons/pubMethod.gif) ![Static member Static member](../icons/Static.gif) | Subtract(DoubleUpperTriMatrix, Double) |
Subtracts a scalar from an upper triangular matrix.
|
![Public method Public method](../icons/pubMethod.gif) ![Code example Code example](../icons/CodeExample.png) | ToCommaSeparated |
Returns a formatted string representation of this matrix using tabs
and newlines.
|
![Public method Public method](../icons/pubMethod.gif) ![Code example Code example](../icons/CodeExample.png) | ToCommaSeparated(String) |
Returns a formatted string representation of this matrix using tabs
and newlines. Numbers are formatted using the specified format string.
|
![Public method Public method](../icons/pubMethod.gif) | ToGeneralMatrix |
Converts this triangular matrix to a general matrix.
|
![Public method Public method](../icons/pubMethod.gif) ![Code example Code example](../icons/CodeExample.png) | ToString |
Returns a formatted string representation of this matrix.
ToCommaSeparated ToCommaSeparated(String) ToTabDelimited ToTabDelimited(String) (Overrides ObjectToString) |
![Public method Public method](../icons/pubMethod.gif) ![Code example Code example](../icons/CodeExample.png) | ToString(String) |
Returns a formatted string representation of this matrix. Numbers are displayed
using the specified format.
ToCommaSeparated ToCommaSeparated(String) ToTabDelimited ToTabDelimited(String) |
![Public method Public method](../icons/pubMethod.gif) ![Code example Code example](../icons/CodeExample.png) | ToTabDelimited |
Returns a formatted string representation of this matrix using tabs
and newlines.
|
![Public method Public method](../icons/pubMethod.gif) ![Code example Code example](../icons/CodeExample.png) | ToTabDelimited(String) |
Returns a formatted string representation of this matrix using tabs
and newlines. Numbers are formatted using the specified format string.
|
![Public method Public method](../icons/pubMethod.gif) | Transpose |
Transposes this matrix.
|
Top
Operators | Name | Description |
---|
![Public operator Public operator](../icons/pubOperator.gif) ![Static member Static member](../icons/Static.gif) | Addition(Double, DoubleUpperTriMatrix) |
Adds a scalar and an upper triangular matrix.
|
![Public operator Public operator](../icons/pubOperator.gif) ![Static member Static member](../icons/Static.gif) | Addition(DoubleUpperTriMatrix, DoubleUpperTriMatrix) |
Adds two upper triangular matrices.
|
![Public operator Public operator](../icons/pubOperator.gif) ![Static member Static member](../icons/Static.gif) | Addition(DoubleUpperTriMatrix, Double) |
Adds an upper triangular matrix and a scalar.
|
![Public operator Public operator](../icons/pubOperator.gif) ![Static member Static member](../icons/Static.gif) | Division(Double, DoubleUpperTriMatrix) |
Divide a scalar by an upper triangular matrix.
|
![Public operator Public operator](../icons/pubOperator.gif) ![Static member Static member](../icons/Static.gif) | Division(DoubleUpperTriMatrix, DoubleUpperTriMatrix) |
Divide an upper triangular matrix by another.
|
![Public operator Public operator](../icons/pubOperator.gif) ![Static member Static member](../icons/Static.gif) | Division(DoubleUpperTriMatrix, Double) |
Divide an upper triangular matrix by a scalar.
|
![Public operator Public operator](../icons/pubOperator.gif) ![Static member Static member](../icons/Static.gif) | Equality(DoubleUpperTriMatrix, DoubleUpperTriMatrix) |
Tests for equality of two upper triangular matrices. Two matrices are equal if they
have the same dimensions and all values are equal.
|
![Public operator Public operator](../icons/pubOperator.gif) ![Static member Static member](../icons/Static.gif) | (FloatUpperTriMatrix to DoubleUpperTriMatrix) |
Implicitly converts a FloatUpperTriMatrix instance into a DoubleUpperTriMatrix
instance.
|
![Public operator Public operator](../icons/pubOperator.gif) ![Static member Static member](../icons/Static.gif) | Inequality(DoubleUpperTriMatrix, DoubleUpperTriMatrix) |
Tests for inequality of two upper triangular matrices. Two matrices are equal if they
have the same dimensions and all values are equal.
|
![Public operator Public operator](../icons/pubOperator.gif) ![Static member Static member](../icons/Static.gif) | Multiply(Double, DoubleUpperTriMatrix) |
Multiply a scalar and an upper triangular matrix.
|
![Public operator Public operator](../icons/pubOperator.gif) ![Static member Static member](../icons/Static.gif) | Multiply(DoubleUpperTriMatrix, DoubleUpperTriMatrix) |
Multiply two upper triangular matrices.
|
![Public operator Public operator](../icons/pubOperator.gif) ![Static member Static member](../icons/Static.gif) | Multiply(DoubleUpperTriMatrix, Double) |
Multiply an upper triangular matrix and a scalar.
|
![Public operator Public operator](../icons/pubOperator.gif) ![Static member Static member](../icons/Static.gif) | Subtraction(Double, DoubleUpperTriMatrix) |
Subtracts an upper triangular matrix from a scalar.
|
![Public operator Public operator](../icons/pubOperator.gif) ![Static member Static member](../icons/Static.gif) | Subtraction(DoubleUpperTriMatrix, DoubleUpperTriMatrix) |
Subtracts one upper triangular matrix from another.
|
![Public operator Public operator](../icons/pubOperator.gif) ![Static member Static member](../icons/Static.gif) | Subtraction(DoubleUpperTriMatrix, Double) |
Subtracts a scalar from an upper triangular matrix.
|
![Public operator Public operator](../icons/pubOperator.gif) ![Static member Static member](../icons/Static.gif) | UnaryNegation(DoubleUpperTriMatrix) |
Negation operator.
|
![Public operator Public operator](../icons/pubOperator.gif) ![Static member Static member](../icons/Static.gif) | UnaryPlus(DoubleUpperTriMatrix) |
Unary + operator. Just returns the input matrix.
|
Top
Remarks
The matrix is stored in a vector column by column. For efficiency, zero elements are not stored.
For example, the following 5 by 5 upper triangular matrix:
| a00 a01 a02 a03 a04 |
| 0 a11 a12 a13 a14 |
A = | 0 0 a22 a23 a24 |
| 0 0 0 a33 a34 |
| 0 0 0 0 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].
See Also