Matrix.Zeros Method
Definition
Namespace: Numerics.NET
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 10.7.0
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 10.7.0
Overload List
| Zeros<T>(Int32, Int32, MatrixElementOrder) | Creates a new DenseMatrix<T> with all elements initialized to zero. |
| Zeros<T>(Int32, Int32, MatrixElementOrder, Boolean) | Creates a new DenseMatrix<T> with all elements initialized to zero. |
Zeros<T>(Int32, Int32, MatrixElementOrder)
Creates a new DenseMatrix<T> with all elements initialized to zero.
public static DenseMatrix<T> Zeros<T>(
int rowCount,
int columnCount,
MatrixElementOrder elementOrder = MatrixElementOrder.ColumnMajor
)
Parameters
- rowCount Int32
- The number of rows in the new matrix.
- columnCount Int32
- The number of columns in the new matrix.
- elementOrder MatrixElementOrder (Optional)
- Optional. A MatrixElementOrder value that specifies the order in which the matrix components are stored in the storage array. The default is column-major.
Type Parameters
- T
- The element type of the matrix.
Return Value
DenseMatrix<T>A new DenseMatrix<T> with all elements set to zero.
Exceptions
| Argument | rowCount or columnCount is less than zero. |
Zeros<T>(Int32, Int32, MatrixElementOrder, Boolean)
Creates a new DenseMatrix<T> with all elements initialized to zero.
public static DenseMatrix<T> Zeros<T>(
int rowCount,
int columnCount,
MatrixElementOrder elementOrder,
bool checkMissingValues
)
Parameters
- rowCount Int32
- The number of rows in the new matrix.
- columnCount Int32
- The number of columns in the new matrix.
- elementOrder MatrixElementOrder
- Optional. A MatrixElementOrder value that specifies the order in which the matrix components are stored in the storage array. The default is column-major.
- checkMissingValues Boolean
- Specifies whether operations involving the matrix should check for the presence of missing values.
Type Parameters
- T
- The element type of the matrix.
Return Value
DenseMatrix<T>A new DenseMatrix<T> with all elements set to zero.
Exceptions
| Argument | rowCount or columnCount is less than zero. |