Table of Contents

Method Shuffle

Namespace
Zyl.VectorTraits
Assembly
VectorTraits.dll

Shuffle(Vector<float>, Vector<int>)

Shuffle and clear (换位并清零). Creates a new vector by selecting values from an input vector using a set of indices (通过使用一组索引从输入向量中选择值,来创建一个新向量). If the index value is out of range, the element will be cleared (若索引值超出范围, 元素会被清零). Mnemonic: rt[i] := (0<=indices[i] && indices[i]<Count)?( vector[indices[i]] ):0.

public static Vector<float> Shuffle(Vector<float> vector, Vector<int> indices)

Parameters

vector Vector<float>

The input vector from which values are selected (从中选择值的输入向量).

indices Vector<int>

The per-element indices used to select a value from vector (用于从 vector 中选择值的每个元素索引).

Returns

Vector<float>

A new vector containing the values from vector selected by the given indices (一个新向量,其中包含给定 indicesvector 中选择的值).

See Also

Shuffle(Vector<double>, Vector<long>)

Shuffle and clear (换位并清零). Creates a new vector by selecting values from an input vector using a set of indices (通过使用一组索引从输入向量中选择值,来创建一个新向量). If the index value is out of range, the element will be cleared (若索引值超出范围, 元素会被清零). Mnemonic: rt[i] := (0<=indices[i] && indices[i]<Count)?( vector[indices[i]] ):0.

public static Vector<double> Shuffle(Vector<double> vector, Vector<long> indices)

Parameters

vector Vector<double>

The input vector from which values are selected (从中选择值的输入向量).

indices Vector<long>

The per-element indices used to select a value from vector (用于从 vector 中选择值的每个元素索引).

Returns

Vector<double>

A new vector containing the values from vector selected by the given indices (一个新向量,其中包含给定 indicesvector 中选择的值).

See Also

Shuffle(Vector<sbyte>, Vector<sbyte>)

Shuffle and clear (换位并清零). Creates a new vector by selecting values from an input vector using a set of indices (通过使用一组索引从输入向量中选择值,来创建一个新向量). If the index value is out of range, the element will be cleared (若索引值超出范围, 元素会被清零). Mnemonic: rt[i] := (0<=indices[i] && indices[i]<Count)?( vector[indices[i]] ):0.

[CLSCompliant(false)]
public static Vector<sbyte> Shuffle(Vector<sbyte> vector, Vector<sbyte> indices)

Parameters

vector Vector<sbyte>

The input vector from which values are selected (从中选择值的输入向量).

indices Vector<sbyte>

The per-element indices used to select a value from vector (用于从 vector 中选择值的每个元素索引).

Returns

Vector<sbyte>

A new vector containing the values from vector selected by the given indices (一个新向量,其中包含给定 indicesvector 中选择的值).

See Also

Shuffle(Vector<byte>, Vector<byte>)

Shuffle and clear (换位并清零). Creates a new vector by selecting values from an input vector using a set of indices (通过使用一组索引从输入向量中选择值,来创建一个新向量). If the index value is out of range, the element will be cleared (若索引值超出范围, 元素会被清零). Mnemonic: rt[i] := (0<=indices[i] && indices[i]<Count)?( vector[indices[i]] ):0.

public static Vector<byte> Shuffle(Vector<byte> vector, Vector<byte> indices)

Parameters

vector Vector<byte>

The input vector from which values are selected (从中选择值的输入向量).

indices Vector<byte>

The per-element indices used to select a value from vector (用于从 vector 中选择值的每个元素索引).

Returns

Vector<byte>

A new vector containing the values from vector selected by the given indices (一个新向量,其中包含给定 indicesvector 中选择的值).

See Also

Shuffle(Vector<short>, Vector<short>)

Shuffle and clear (换位并清零). Creates a new vector by selecting values from an input vector using a set of indices (通过使用一组索引从输入向量中选择值,来创建一个新向量). If the index value is out of range, the element will be cleared (若索引值超出范围, 元素会被清零). Mnemonic: rt[i] := (0<=indices[i] && indices[i]<Count)?( vector[indices[i]] ):0.

public static Vector<short> Shuffle(Vector<short> vector, Vector<short> indices)

Parameters

vector Vector<short>

The input vector from which values are selected (从中选择值的输入向量).

indices Vector<short>

The per-element indices used to select a value from vector (用于从 vector 中选择值的每个元素索引).

Returns

Vector<short>

A new vector containing the values from vector selected by the given indices (一个新向量,其中包含给定 indicesvector 中选择的值).

See Also

Shuffle(Vector<ushort>, Vector<ushort>)

Shuffle and clear (换位并清零). Creates a new vector by selecting values from an input vector using a set of indices (通过使用一组索引从输入向量中选择值,来创建一个新向量). If the index value is out of range, the element will be cleared (若索引值超出范围, 元素会被清零). Mnemonic: rt[i] := (0<=indices[i] && indices[i]<Count)?( vector[indices[i]] ):0.

[CLSCompliant(false)]
public static Vector<ushort> Shuffle(Vector<ushort> vector, Vector<ushort> indices)

Parameters

vector Vector<ushort>

The input vector from which values are selected (从中选择值的输入向量).

indices Vector<ushort>

The per-element indices used to select a value from vector (用于从 vector 中选择值的每个元素索引).

Returns

Vector<ushort>

A new vector containing the values from vector selected by the given indices (一个新向量,其中包含给定 indicesvector 中选择的值).

See Also

Shuffle(Vector<int>, Vector<int>)

Shuffle and clear (换位并清零). Creates a new vector by selecting values from an input vector using a set of indices (通过使用一组索引从输入向量中选择值,来创建一个新向量). If the index value is out of range, the element will be cleared (若索引值超出范围, 元素会被清零). Mnemonic: rt[i] := (0<=indices[i] && indices[i]<Count)?( vector[indices[i]] ):0.

public static Vector<int> Shuffle(Vector<int> vector, Vector<int> indices)

Parameters

vector Vector<int>

The input vector from which values are selected (从中选择值的输入向量).

indices Vector<int>

The per-element indices used to select a value from vector (用于从 vector 中选择值的每个元素索引).

Returns

Vector<int>

A new vector containing the values from vector selected by the given indices (一个新向量,其中包含给定 indicesvector 中选择的值).

See Also

Shuffle(Vector<uint>, Vector<uint>)

Shuffle and clear (换位并清零). Creates a new vector by selecting values from an input vector using a set of indices (通过使用一组索引从输入向量中选择值,来创建一个新向量). If the index value is out of range, the element will be cleared (若索引值超出范围, 元素会被清零). Mnemonic: rt[i] := (0<=indices[i] && indices[i]<Count)?( vector[indices[i]] ):0.

[CLSCompliant(false)]
public static Vector<uint> Shuffle(Vector<uint> vector, Vector<uint> indices)

Parameters

vector Vector<uint>

The input vector from which values are selected (从中选择值的输入向量).

indices Vector<uint>

The per-element indices used to select a value from vector (用于从 vector 中选择值的每个元素索引).

Returns

Vector<uint>

A new vector containing the values from vector selected by the given indices (一个新向量,其中包含给定 indicesvector 中选择的值).

See Also

Shuffle(Vector<long>, Vector<long>)

Shuffle and clear (换位并清零). Creates a new vector by selecting values from an input vector using a set of indices (通过使用一组索引从输入向量中选择值,来创建一个新向量). If the index value is out of range, the element will be cleared (若索引值超出范围, 元素会被清零). Mnemonic: rt[i] := (0<=indices[i] && indices[i]<Count)?( vector[indices[i]] ):0.

public static Vector<long> Shuffle(Vector<long> vector, Vector<long> indices)

Parameters

vector Vector<long>

The input vector from which values are selected (从中选择值的输入向量).

indices Vector<long>

The per-element indices used to select a value from vector (用于从 vector 中选择值的每个元素索引).

Returns

Vector<long>

A new vector containing the values from vector selected by the given indices (一个新向量,其中包含给定 indicesvector 中选择的值).

See Also

Shuffle(Vector<ulong>, Vector<ulong>)

Shuffle and clear (换位并清零). Creates a new vector by selecting values from an input vector using a set of indices (通过使用一组索引从输入向量中选择值,来创建一个新向量). If the index value is out of range, the element will be cleared (若索引值超出范围, 元素会被清零). Mnemonic: rt[i] := (0<=indices[i] && indices[i]<Count)?( vector[indices[i]] ):0.

[CLSCompliant(false)]
public static Vector<ulong> Shuffle(Vector<ulong> vector, Vector<ulong> indices)

Parameters

vector Vector<ulong>

The input vector from which values are selected (从中选择值的输入向量).

indices Vector<ulong>

The per-element indices used to select a value from vector (用于从 vector 中选择值的每个元素索引).

Returns

Vector<ulong>

A new vector containing the values from vector selected by the given indices (一个新向量,其中包含给定 indicesvector 中选择的值).

See Also