แก้ไข

แชร์ผ่าน


Vector.Create Method

Definition

Overloads

Create<T>(ReadOnlySpan<T>)

Creates a new Vector<T> from a given readonly span.

Create<T>(T)

Creates a new Vector<T> instance with all elements initialized to the specified value.

Create<T>(ReadOnlySpan<T>)

Creates a new Vector<T> from a given readonly span.

public:
generic <typename T>
 static System::Numerics::Vector<T> Create(ReadOnlySpan<T> values);
public static System.Numerics.Vector<T> Create<T>(ReadOnlySpan<T> values);
static member Create : ReadOnlySpan<'T> -> System.Numerics.Vector<'T>
Public Function Create(Of T) (values As ReadOnlySpan(Of T)) As Vector(Of T)

Type Parameters

T

The type of the elements in the vector.

Parameters

values
ReadOnlySpan<T>

The readonly span from which the vector is created.

Returns

A new Vector<T> with its elements set to the first Count elements from values.

Exceptions

The length of values is less than Count.

The type of values (T) is not supported.

Applies to

Create<T>(T)

Creates a new Vector<T> instance with all elements initialized to the specified value.

public:
generic <typename T>
 static System::Numerics::Vector<T> Create(T value);
public static System.Numerics.Vector<T> Create<T>(T value);
static member Create : 'T -> System.Numerics.Vector<'T>
Public Function Create(Of T) (value As T) As Vector(Of T)

Type Parameters

T

The type of the elements in the vector.

Parameters

value
T

The value that all elements will be initialized to.

Returns

A new Vector<T> with all elements initialized to value.

Exceptions

The type of value (T) is not supported.

Applies to