<PackageReference Include="System.Numerics.Vectors" Version="4.5.0" />

System.Numerics.Vector<T>

public struct Vector<T> : IEquatable<Vector<T>>, IFormattable where T : struct
Represents a single vector of a specified numeric type that is suitable for low-level optimization of parallel algorithms.
public static int Count { get; }

Returns the number of elements stored in the vector.

public static Vector<T> One { get; }

Returns a vector containing all ones.

public static Vector<T> Zero { get; }

Returns a vector containing all zeroes.

public T this[int index] { get; }

Gets the element at a specified index.

public Vector(T value)

Creates a vector whose components are of a specified type.

public Vector(T[] values)

Creates a vector from a specified array.

public Vector(T[] values, int index)

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

public static Vector<T> op_Addition(Vector<T> left, Vector<T> right)

Adds two vectors together.

public static Vector<T> op_BitwiseAnd(Vector<T> left, Vector<T> right)

Returns a new vector by performing a bitwise And operation on each of the elements in two vectors.

public static Vector<T> op_BitwiseOr(Vector<T> left, Vector<T> right)

Returns a new vector by performing a bitwise Or operation on each of the elements in two vectors.

public static Vector<T> op_Division(Vector<T> left, Vector<T> right)

Divides the first vector by the second.

public static bool op_Equality(Vector<T> left, Vector<T> right)

Returns a value that indicates whether each pair of elements in two specified vectors are equal.

public static Vector<T> op_ExclusiveOr(Vector<T> left, Vector<T> right)

Returns a new vector by performing a bitwise XOr operation on each of the elements in two vectors.

public static Vector<byte> op_Explicit(Vector<T> value)

public static Vector<sbyte> op_Explicit(Vector<T> value)

public static Vector<ushort> op_Explicit(Vector<T> value)

public static Vector<short> op_Explicit(Vector<T> value)

public static Vector<uint> op_Explicit(Vector<T> value)

public static Vector<int> op_Explicit(Vector<T> value)

public static Vector<ulong> op_Explicit(Vector<T> value)

public static Vector<long> op_Explicit(Vector<T> value)

public static Vector<float> op_Explicit(Vector<T> value)

public static Vector<double> op_Explicit(Vector<T> value)

public static bool op_Inequality(Vector<T> left, Vector<T> right)

Returns a value that indicates whether any single pair of elements in the specified vectors is equal.

public static Vector<T> op_Multiply(Vector<T> left, Vector<T> right)

Multiplies two vectors together.

public static Vector<T> op_Multiply(Vector<T> value, T factor)

Multiplies a vector by a specified scalar value.

public static Vector<T> op_Multiply(T factor, Vector<T> value)

Multiplies a vector by the given scalar.

public static Vector<T> op_OnesComplement(Vector<T> value)

Returns a new vector whose elements are obtained by taking the one&#39;s complement of a specified vector&#39;s elements.

public static Vector<T> op_Subtraction(Vector<T> left, Vector<T> right)

Subtracts the second vector from the first.

public static Vector<T> op_UnaryNegation(Vector<T> value)

Negates a given vector.

public void CopyTo(T[] destination)

Copies the vector instance to a specified destination array.

public void CopyTo(T[] destination, int startIndex)

Copies the vector instance to a specified destination array starting at a specified index position.

public bool Equals(Vector<T> other)

Returns a value that indicates whether this instance is equal to a specified vector.

public string ToString(string format)

Returns the string representation of this vector using the specified format string to format individual elements.

public string ToString(string format, IFormatProvider formatProvider)

Returns the string representation of this vector using the specified format string to format individual elements and the specified format provider to define culture-specific formatting.