Matrix.Wrap Upper Triangular Method
Definition
Namespace: Numerics.NET
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 10.0.0
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 10.0.0
Overload List
| Wrap | Creates a new upper TriangularMatrix<T> by wrapping an existing Array2D<T> without copying. |
| Wrap | Creates a new upper TriangularMatrix<T> by wrapping an existing one-dimensional array without copying. |
| Wrap | Creates a new upper TriangularMatrix<T> by wrapping an existing Memory2D<T> without copying. |
WrapUpperTriangular<T>(Array2D<T>, Int32, Int32, MatrixElementOrder, MatrixDiagonal, ArrayMutability)
Creates a new upper TriangularMatrix<T> by wrapping an existing Array2D<T>
without copying.
public static TriangularMatrix<T> WrapUpperTriangular<T>(
Array2D<T> source,
int rowCount,
int columnCount,
MatrixElementOrder elementOrder = MatrixElementOrder.ColumnMajor,
MatrixDiagonal diagonal = MatrixDiagonal.NonUnitDiagonal,
ArrayMutability mutability = ArrayMutability.MutableValues
)
Parameters
- source Array2D<T>
- An Array2D<T> to wrap.
- rowCount Int32
- The number of rows in the matrix.
- columnCount Int32
- The number of columns in the matrix.
- elementOrder MatrixElementOrder (Optional)
- A MatrixElementOrder value that indicates whether the elements are stored in column-major or row-major order.
- diagonal MatrixDiagonal (Optional)
- Specifies whether the matrix has a unit diagonal.
- mutability ArrayMutability (Optional)
- Specifies how the matrix's values may be changed. The default is mutable values.
Type Parameters
- T
- The element type of the matrix.
Return Value
TriangularMatrix<T>A new upper TriangularMatrix<T> that wraps the source storage.
Remarks
Changes to the matrix will affect the original storage, and vice versa.
Exceptions
| Argument | source is null. |
WrapUpperTriangular<T>(T[], Int32, Int32, MatrixElementOrder, MatrixDiagonal, ArrayMutability)
Creates a new upper TriangularMatrix<T> by wrapping an existing one-dimensional array
without copying.
public static TriangularMatrix<T> WrapUpperTriangular<T>(
T[] source,
int rowCount,
int columnCount,
MatrixElementOrder elementOrder = MatrixElementOrder.ColumnMajor,
MatrixDiagonal diagonal = MatrixDiagonal.NonUnitDiagonal,
ArrayMutability mutability = ArrayMutability.MutableValues
)
Parameters
- source T[]
- A one-dimensional array to wrap.
- rowCount Int32
- The number of rows in the matrix.
- columnCount Int32
- The number of columns in the matrix.
- elementOrder MatrixElementOrder (Optional)
- A MatrixElementOrder value that indicates whether the elements in source are stored in column-major or row-major order.
- diagonal MatrixDiagonal (Optional)
- Specifies whether the matrix has a unit diagonal.
- mutability ArrayMutability (Optional)
- Specifies how the matrix's values may be changed. The default is mutable values.
Type Parameters
- T
- The element type of the matrix.
Return Value
TriangularMatrix<T>A new upper TriangularMatrix<T> that wraps the source array.
Remarks
Changes to the matrix will affect the original array, and vice versa.
Exceptions
| Argument | source is null. |
WrapUpperTriangular<T>(Memory2D<T>, Int32, Int32, MatrixElementOrder, MatrixDiagonal, ArrayMutability)
Creates a new upper TriangularMatrix<T> by wrapping an existing Memory2D<T>
without copying.
public static TriangularMatrix<T> WrapUpperTriangular<T>(
Memory2D<T> source,
int rowCount,
int columnCount,
MatrixElementOrder elementOrder = MatrixElementOrder.ColumnMajor,
MatrixDiagonal diagonal = MatrixDiagonal.NonUnitDiagonal,
ArrayMutability mutability = ArrayMutability.MutableValues
)
Parameters
- source Memory2D<T>
- A Memory2D<T> to wrap.
- rowCount Int32
- The number of rows in the matrix.
- columnCount Int32
- The number of columns in the matrix.
- elementOrder MatrixElementOrder (Optional)
- A MatrixElementOrder value that indicates whether the elements are stored in column-major or row-major order.
- diagonal MatrixDiagonal (Optional)
- Specifies whether the matrix has a unit diagonal.
- mutability ArrayMutability (Optional)
- Specifies how the matrix's values may be changed. The default is mutable values.
Type Parameters
- T
- The element type of the matrix.
Return Value
TriangularMatrix<T>A new upper TriangularMatrix<T> that wraps the source storage.
Remarks
Changes to the matrix will affect the original storage, and vice versa.