Vector<T>.Set Values Method
Definition
Namespace: Numerics.NET
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.2
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.2
Overload List
Set | Sets a range of elements of the vector to the specified value. |
Set | Sets the elements of a vector that match the specified condition to the specified value. |
Set | Sets all the elements that meet a condition to the specified value. |
Set | Sets the elements of a vector that match the specified condition. |
SetValues(T, Range)
Sets a range of elements of the vector to the specified value.
public virtual Vector<T> SetValues(
T value,
Range range
)
Parameters
- value T
- The value to be assigned to the matching elements.
- range Range
- The range of the elements to set.
Return Value
Vector<T>SetValues(T, Vector<Boolean>)
Sets the elements of a vector that match the specified condition
to the specified value.
public virtual Vector<T> SetValues(
T value,
Vector<bool> mask
)
Parameters
- value T
- The value to be assigned to the matching elements.
- mask Vector<Boolean>
- A boolean vector that specifies the elements to select.
Field Value
Vector<T>A Vector<T> that contains the elements in this instance for which the corresponding element in mask is true.
SetValues(T, Func<T, Boolean>)
Sets all the elements that meet a condition to
the specified value.
public virtual Vector<T> SetValues(
T value,
Func<T, bool> condition
)
Parameters
- value T
- The value to be assigned to the matching elements.
- condition Func<T, Boolean>
- A condition to apply to each element.
Return Value
Vector<T>A reference to this Vector<T> with the elements for which condition is true replaced with value.
SetValues(Vector<T>, Vector<Boolean>)
Sets the elements of a vector that match the specified condition.
protected virtual void SetValues(
Vector<T> values,
Vector<bool> mask
)