Vector.Zeros<T> Method
Constructs a new vector with all elements initialized to zero.
Definition
Namespace: Numerics.NET
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 10.0.0
C#
A DenseVector<T>.
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 10.0.0
public static DenseVector<T> Zeros<T>(
int length,
bool checkMissingValues = false
)
Parameters
- length Int32
- The length of the new DenseVector<T>.
- checkMissingValues Boolean (Optional)
- Specifies whether operations involving the vector should check for the presence of missing values.
Type Parameters
- T
Return Value
DenseVector<T>A DenseVector<T>.
Remarks
The elements of the vector are set to zero.
Exceptions
| Argument | length is less than zero. |