Vector.Zeros 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
| Zeros<T>(Int32) | Constructs a new vector with all elements initialized to zero. |
| Zeros<T>(Int32, Boolean) | Constructs a new vector with all elements initialized to zero. |
Zeros<T>(Int32)
Constructs a new vector with all elements initialized to zero.
public static DenseVector<T> Zeros<T>(
int length
)
Parameters
- length Int32
- The length of the new DenseVector<T>.
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. |
Zeros<T>(Int32, Boolean)
Constructs a new vector with all elements initialized to zero.
public static DenseVector<T> Zeros<T>(
int length,
bool checkMissingValues
)
Parameters
- length Int32
- The length of the new DenseVector<T>.
- checkMissingValues Boolean
- 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. |