Vector<T> Konstruktory

Definice

Creates an instance of Vector<T>.Creates an instance of Vector<T>.

Přetížení

Vector<T>(ReadOnlySpan<Byte>)

Constructs a vector from the given read-only span of bytes.Constructs a vector from the given read-only span of bytes.

Vector<T>(ReadOnlySpan<T>)

Constructs a vector from the given ReadOnlySpan<T>.Constructs a vector from the given ReadOnlySpan<T>.

Vector<T>(Span<T>)

Constructs a vector from the given Span<T>.Constructs a vector from the given Span<T>.

Vector<T>(T)

Creates a vector whose components are of a specified type.Creates a vector whose components are of a specified type.

Vector<T>(T[])

Creates a vector from a specified array.Creates a vector from a specified array.

Vector<T>(T[], Int32)

Creates a vector from a specified array starting at a specified index position.Creates a vector from a specified array starting at a specified index position.

Poznámky

The type T can be any of the following numeric types:The type T can be any of the following numeric types:

Klíčová slova jazyka C#C# keywords Framework TypeFramework Type
sbyte SByte
byte Byte
short Int16
ushort UInt16
int Int32
uint UInt32
long Int64
ulong UInt64
float Single
double Double

Vector<T>(ReadOnlySpan<Byte>)

Constructs a vector from the given read-only span of bytes.Constructs a vector from the given read-only span of bytes.

public:
 Vector(ReadOnlySpan<System::Byte> values);
public Vector (ReadOnlySpan<byte> values);
new System.Numerics.Vector<'T (requires 'T : struct)> : ReadOnlySpan<byte> -> System.Numerics.Vector<'T (requires 'T : struct)>
Public Sub New (values As ReadOnlySpan(Of Byte))

Parametry

values
ReadOnlySpan<Byte>

A read-only span of bytes that contains the values to add to the vector.A read-only span of bytes that contains the values to add to the vector. The span must contain at least Count elements and only the first Count elements are used.The span must contain at least Count elements and only the first Count elements are used.

Výjimky

values did not contain at least Count elements.values did not contain at least Count elements.

Poznámky

Only the first Count elements are added to the vector.Only the first Count elements are added to the vector. The remainders are ignored.The remainders are ignored.

Vector<T>(ReadOnlySpan<T>)

Constructs a vector from the given ReadOnlySpan<T>.Constructs a vector from the given ReadOnlySpan<T>.

public:
 Vector(ReadOnlySpan<T> values);
public Vector (ReadOnlySpan<T> values);
new System.Numerics.Vector<'T (requires 'T : struct)> : ReadOnlySpan<'T (requires 'T : struct)> -> System.Numerics.Vector<'T (requires 'T : struct)>
Public Sub New (values As ReadOnlySpan(Of T))

Parametry

values
ReadOnlySpan<T>

The values to add to the vector, as a read-only span of objects of type T. The span must contain at least Count elements and only the first Count elements are used.The values to add to the vector, as a read-only span of objects of type T. The span must contain at least Count elements and only the first Count elements are used.

Výjimky

values did not contain at least Count elements.values did not contain at least Count elements.

Poznámky

Only the first Count elements are added to the vector.Only the first Count elements are added to the vector. The remainders are ignored.The remainders are ignored.

Vector<T>(Span<T>)

Constructs a vector from the given Span<T>.Constructs a vector from the given Span<T>.

public:
 Vector(Span<T> values);
public Vector (Span<T> values);
new System.Numerics.Vector<'T (requires 'T : struct)> : Span<'T (requires 'T : struct)> -> System.Numerics.Vector<'T (requires 'T : struct)>
Public Sub New (values As Span(Of T))

Parametry

values
Span<T>

The values to add to the vector, as a span of objects of type T. The span must contain at least Count elements and only the first Count elements are used.The values to add to the vector, as a span of objects of type T. The span must contain at least Count elements and only the first Count elements are used.

Výjimky

values did not contain at least Count elements.values did not contain at least Count elements.

Poznámky

Only the first Count elements are added to the vector.Only the first Count elements are added to the vector. The remainders are ignored.The remainders are ignored.

Vector<T>(T)

Creates a vector whose components are of a specified type.Creates a vector whose components are of a specified type.

public:
 Vector(T value);
public Vector (T value);
new System.Numerics.Vector<'T (requires 'T : struct)> : 'T -> System.Numerics.Vector<'T (requires 'T : struct)>
Public Sub New (value As T)

Parametry

value
T

The numeric type that defines the type of the components in the vector.The numeric type that defines the type of the components in the vector.

Vector<T>(T[])

Creates a vector from a specified array.Creates a vector from a specified array.

public:
 Vector(cli::array <T> ^ values);
public Vector (T[] values);
new System.Numerics.Vector<'T (requires 'T : struct)> : 'T[] -> System.Numerics.Vector<'T (requires 'T : struct)>
Public Sub New (values As T())

Parametry

values
T[]

The values to add to the vector, as an array of objects of type T. The array must contain at least Count elements and only the first Count elements are used.The values to add to the vector, as an array of objects of type T. The array must contain at least Count elements and only the first Count elements are used.

Výjimky

values je null.values is null.

Poznámky

Only the first Count elements are added to the vector.Only the first Count elements are added to the vector. The remainders are ignored.The remainders are ignored.

Vector<T>(T[], Int32)

Creates a vector from a specified array starting at a specified index position.Creates a vector from a specified array starting at a specified index position.

public:
 Vector(cli::array <T> ^ values, int index);
public Vector (T[] values, int index);
new System.Numerics.Vector<'T (requires 'T : struct)> : 'T[] * int -> System.Numerics.Vector<'T (requires 'T : struct)>
Public Sub New (values As T(), index As Integer)

Parametry

values
T[]

The values to add to the vector, as an array of objects of type T. The array must contain at least Count elements from the specified index and only the first Count elements are used.The values to add to the vector, as an array of objects of type T. The array must contain at least Count elements from the specified index and only the first Count elements are used.

index
Int32

The starting index position from which to create the vector.The starting index position from which to create the vector.

Výjimky

values je null.values is null.

Hodnota index je menší než nula.index is less than zero.

-nebo--or- The length of values minus index is less than Count.The length of values minus index is less than Count.

Poznámky

Only the first Count elements are added to the vector.Only the first Count elements are added to the vector. The remainders are ignored.The remainders are ignored.

Platí pro