Matrix.Get Symmetric View Method
Definition
Namespace: Numerics.NET
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 10.5.0
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 10.5.0
Overload List
| Get | Returns a view of a matrix interpreted as symmetric. |
| Get | Returns a view of a matrix interpreted as symmetric with an explicit size. |
GetSymmetricView<T>(Matrix<T>, MatrixTriangle, ArrayMutability)
Returns a view of a matrix interpreted as symmetric.
public static Matrix<T> GetSymmetricView<T>(
Matrix<T> source,
MatrixTriangle triangle = MatrixTriangle.Upper,
ArrayMutability mutability = ArrayMutability.Inherit
)
Parameters
- source Matrix<T>
- The source matrix.
- triangle MatrixTriangle (Optional)
- Specifies which triangle of source holds the authoritative values. The default is Upper.
- mutability ArrayMutability (Optional)
- The desired mutability of the view. Must not exceed the mutability of source. The default is Inherit.
Type Parameters
- T
- The element type of the matrix.
Return Value
Matrix<T>A matrix view where element [i,j] mirrors [j,i] from the stored triangle.
Exceptions
| Argument | source is null. |
| Invalid | mutability is more permissive than the mutability of source. |
GetSymmetricView<T>(Matrix<T>, Int32, MatrixTriangle, ArrayMutability)
Returns a view of a matrix interpreted as symmetric with an explicit size.
public static Matrix<T> GetSymmetricView<T>(
Matrix<T> source,
int size,
MatrixTriangle triangle = MatrixTriangle.Upper,
ArrayMutability mutability = ArrayMutability.Inherit
)
Parameters
- source Matrix<T>
- The source matrix.
- size Int32
- The number of rows and columns of the view. Must be between 0 and the smaller of the row count and column count of source (inclusive).
- triangle MatrixTriangle (Optional)
- Specifies which triangle of source holds the authoritative values. The default is Upper.
- mutability ArrayMutability (Optional)
- The desired mutability of the view. Must not exceed the mutability of source. The default is Inherit.
Type Parameters
- T
- The element type of the matrix.
Return Value
Matrix<T>A size×size matrix view where element [i,j] mirrors [j,i] from the stored triangle.
Exceptions
| Argument | source is null. |
| Argument | size is less than 0 or greater than the smaller of the row count and column count of source. |