Vector<T>.GetValues Method

Definition

Namespace: Numerics.NET
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.0

Overload List

GetValues(Vector<Boolean>) Returns the elements of a vector that match the specified condition.
GetValues(Subset, Intent) Returns a vector that contains the specified subset of elements of the vector.
GetValues(Int32[], Boolean, Intent) Returns a new vector that contains the elements of the vector with the specified indexes.
GetValues(ReadOnlySpan<Int32>, Boolean, Intent) Returns a new vector that contains the elements of the vector with the specified indexes.
GetValues<K>(IEnumerable<K>) Returns a vector containing the items at the specified key values.
Preliminary

GetValues<K>(IEnumerable<K>)

This API is preliminary and subject to change.
Returns a vector containing the items at the specified key values.
C#
public Vector<T> GetValues<K>(
	IEnumerable<K> keys
)

Parameters

keys  IEnumerable<K>
A sequence of keys.

Type Parameters

K
The type of the keys.

Return Value

Vector<T>
A vector containing the items at the specified keys.

GetValues(Vector<Boolean>)

Returns the elements of a vector that match the specified condition.
C#
protected virtual Vector<T> GetValues(
	Vector<bool> mask
)

Parameters

mask  Vector<Boolean>
A boolean vector that specifies the elements to select.

Return Value

Vector<T>
A Vector<T> that contains the elements in this instance for which the corresponding element in mask is true.

GetValues(Subset, Intent)

Returns a vector that contains the specified subset of elements of the vector.
C#
public virtual Vector<T> GetValues(
	Subset subset,
	Intent intent
)

Parameters

subset  Subset
A Subset that specifies the elements to return.
intent  Intent
An Intent value that specifies the intended use of the sub-vector.

Return Value

Vector<T>
A Vector<T> containing the elements of this instance specified by subset.

GetValues(Int32[], Boolean, Intent)

Returns a new vector that contains the elements of the vector with the specified indexes.
C#
public virtual Vector<T> GetValues(
	int[] indexes,
	bool allowMissingValues,
	Intent intent
)

Parameters

indexes  Int32[]
A sequence of integers.
allowMissingValues  Boolean
If true, negative values in indexes are interpreted as missing values; otherwise missing values cause an exception.
intent  Intent
An Intent value that specifies the intended use of the sub-vector.

Return Value

Vector<T>
A Vector<T> containing a sequence of elements of this instance whose index is the corresponding value in indexes.

GetValues(ReadOnlySpan<Int32>, Boolean, Intent)

Returns a new vector that contains the elements of the vector with the specified indexes.
C#
public virtual Vector<T> GetValues(
	ReadOnlySpan<int> indexes,
	bool allowMissingValues = true,
	Intent intent = Intent.ReadOnlyView
)

Parameters

indexes  ReadOnlySpan<Int32>
A sequence of integers.
allowMissingValues  Boolean  (Optional)
If true, negative values in indexes are interpreted as missing values; otherwise missing values cause an exception.
intent  Intent  (Optional)
An Intent value that specifies the intended use of the sub-vector.

Return Value

Vector<T>
A Vector<T> containing a sequence of elements of this instance whose index is the corresponding value in indexes.

See Also