Vector<T> Structure

 

Represents a single vector of a specified numeric type that is suitable for low-level optimization of parallel algorithms.

Namespace:   System.Numerics
Assembly:  System.Numerics.Vectors (in System.Numerics.Vectors.dll)

public struct Vector<T> : IEquatable<Vector<T>>, IFormattable
where T : struct

Type Parameters

T

The vector type. T can be any primitive numeric type.

NameDescription
System_CAPS_pubmethodVector<T>(T)

Creates a vector whose components are of a specified type.

System_CAPS_pubmethodVector<T>(T[])

Creates a vector from a specified array.

System_CAPS_pubmethodVector<T>(T[], Int32)

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

NameDescription
System_CAPS_pubpropertySystem_CAPS_staticCount

Returns the number of elements stored in the vector.

System_CAPS_pubpropertyItem[Int32]

Gets the element at a specified index.

System_CAPS_pubpropertySystem_CAPS_staticOne

Returns a vector containing all ones.

System_CAPS_pubpropertySystem_CAPS_staticZero

Returns a vector containing all zeroes.

NameDescription
System_CAPS_pubmethodCopyTo(T[])

Copies the vector instance to a specified destination array.

System_CAPS_pubmethodCopyTo(T[], Int32)

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

System_CAPS_pubmethodEquals(Object)

Returns a value that indicates whether this instance is equal to a specified object. (Overrides ValueType.Equals(Object).)

System_CAPS_pubmethodEquals(Vector<T>)

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

System_CAPS_pubmethodGetHashCode()

Returns the hash code for this instance. (Overrides ValueType.GetHashCode().)

System_CAPS_pubmethodGetType()

(Inherited from Object.)

System_CAPS_pubmethodToString()

Returns the string representation of this vector using default formatting. (Overrides ValueType.ToString().)

System_CAPS_pubmethodToString(String)

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

System_CAPS_pubmethodToString(String, IFormatProvider)

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.

NameDescription
System_CAPS_puboperatorSystem_CAPS_staticAddition(Vector<T>, Vector<T>)

Adds two vectors together.

System_CAPS_puboperatorSystem_CAPS_staticBitwiseAnd(Vector<T>, Vector<T>)

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

System_CAPS_puboperatorSystem_CAPS_staticBitwiseOr(Vector<T>, Vector<T>)

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

System_CAPS_puboperatorSystem_CAPS_staticDivision(Vector<T>, Vector<T>)

Divides the first vector by the second.

System_CAPS_puboperatorSystem_CAPS_staticEquality(Vector<T>, Vector<T>)

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

System_CAPS_puboperatorSystem_CAPS_staticExclusiveOr(Vector<T>, Vector<T>)

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

System_CAPS_puboperatorSystem_CAPS_staticExplicit(Vector<T> to Vector<Byte>)

Reinterprets the bits of the specified vector into a vector of type Byte.

System_CAPS_puboperatorSystem_CAPS_staticExplicit(Vector<T> to Vector<Double>)

Reinterprets the bits of the specified vector into a vector of type Double.

System_CAPS_puboperatorSystem_CAPS_staticExplicit(Vector<T> to Vector<Int16>)

Reinterprets the bits of the specified vector into a vector of type Int16.

System_CAPS_puboperatorSystem_CAPS_staticExplicit(Vector<T> to Vector<Int32>)

Reinterprets the bits of the specified vector into a vector of type Int32.

System_CAPS_puboperatorSystem_CAPS_staticExplicit(Vector<T> to Vector<Int64>)

Reinterprets the bits of the specified vector into a vector of type Int64.

System_CAPS_puboperatorSystem_CAPS_staticExplicit(Vector<T> to Vector<SByte>)

Reinterprets the bits of the specified vector into a vector of type SByte.

System_CAPS_puboperatorSystem_CAPS_staticExplicit(Vector<T> to Vector<Single>)

Reinterprets the bits of the specified vector into a vector of type Single.

System_CAPS_puboperatorSystem_CAPS_staticExplicit(Vector<T> to Vector<UInt16>)

Reinterprets the bits of the specified vector into a vector of type UInt16.

System_CAPS_puboperatorSystem_CAPS_staticExplicit(Vector<T> to Vector<UInt32>)

Reinterprets the bits of the specified vector into a vector of type UInt32.

System_CAPS_puboperatorSystem_CAPS_staticExplicit(Vector<T> to Vector<UInt64>)

Reinterprets the bits of the specified vector into a vector of type UInt64.

System_CAPS_puboperatorSystem_CAPS_staticInequality(Vector<T>, Vector<T>)

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

System_CAPS_puboperatorSystem_CAPS_staticMultiply(T, Vector<T>)

Multiplies a vector by the given scalar.

System_CAPS_puboperatorSystem_CAPS_staticMultiply(Vector<T>, T)

Multiplies a vector by a specified scalar value.

System_CAPS_puboperatorSystem_CAPS_staticMultiply(Vector<T>, Vector<T>)

Multiplies two vectors together.

System_CAPS_puboperatorSystem_CAPS_staticOnesComplement(Vector<T>)

Returns a new vector whose elements are obtained by taking the one's complement of a specified vector's elements.

System_CAPS_puboperatorSystem_CAPS_staticSubtraction(Vector<T>, Vector<T>)

Subtracts the second vector from the first.

System_CAPS_puboperatorSystem_CAPS_staticUnaryNegation(Vector<T>)

Negates a given vector.

Vector<T> is an immutable structure that represents a single vector of a specified numeric type. The count of a Vector<T> instance is fixed, but its upper limit is CPU-register dependent. It is intended to be used as a building block for vectorizing large algorithms.

The Vector<T> structure provides support for hardware acceleration.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Return to top
Show: