Table of Contents

Method Sum

Namespace
Zyl.VectorTraits
Assembly
VectorTraits.dll

Sum(Vector<float>)

Computes the sum of all elements in a vector (计算向量中所有元素的总和). Mnemonic: rt := value[0] + value[1] + value[2] + ... + value[Count-1].

public static float Sum(Vector<float> value)

Parameters

value Vector<float>

The vector whose elements will be summed (将对其元素求和的向量).

Returns

float

The sum of all elements in value (value 中所有元素的总和).

See Also
Sum<T>(Vector<T>)

Sum(Vector<double>)

Computes the sum of all elements in a vector (计算向量中所有元素的总和). Mnemonic: rt := value[0] + value[1] + value[2] + ... + value[Count-1].

public static double Sum(Vector<double> value)

Parameters

value Vector<double>

The vector whose elements will be summed (将对其元素求和的向量).

Returns

double

The sum of all elements in value (value 中所有元素的总和).

See Also
Sum<T>(Vector<T>)

Sum(Vector<sbyte>)

Computes the sum of all elements in a vector (计算向量中所有元素的总和). Mnemonic: rt := value[0] + value[1] + value[2] + ... + value[Count-1].

[CLSCompliant(false)]
public static sbyte Sum(Vector<sbyte> value)

Parameters

value Vector<sbyte>

The vector whose elements will be summed (将对其元素求和的向量).

Returns

sbyte

The sum of all elements in value (value 中所有元素的总和).

See Also
Sum<T>(Vector<T>)

Sum(Vector<byte>)

Computes the sum of all elements in a vector (计算向量中所有元素的总和). Mnemonic: rt := value[0] + value[1] + value[2] + ... + value[Count-1].

public static byte Sum(Vector<byte> value)

Parameters

value Vector<byte>

The vector whose elements will be summed (将对其元素求和的向量).

Returns

byte

The sum of all elements in value (value 中所有元素的总和).

See Also
Sum<T>(Vector<T>)

Sum(Vector<short>)

Computes the sum of all elements in a vector (计算向量中所有元素的总和). Mnemonic: rt := value[0] + value[1] + value[2] + ... + value[Count-1].

public static short Sum(Vector<short> value)

Parameters

value Vector<short>

The vector whose elements will be summed (将对其元素求和的向量).

Returns

short

The sum of all elements in value (value 中所有元素的总和).

See Also
Sum<T>(Vector<T>)

Sum(Vector<ushort>)

Computes the sum of all elements in a vector (计算向量中所有元素的总和). Mnemonic: rt := value[0] + value[1] + value[2] + ... + value[Count-1].

[CLSCompliant(false)]
public static ushort Sum(Vector<ushort> value)

Parameters

value Vector<ushort>

The vector whose elements will be summed (将对其元素求和的向量).

Returns

ushort

The sum of all elements in value (value 中所有元素的总和).

See Also
Sum<T>(Vector<T>)

Sum(Vector<int>)

Computes the sum of all elements in a vector (计算向量中所有元素的总和). Mnemonic: rt := value[0] + value[1] + value[2] + ... + value[Count-1].

public static int Sum(Vector<int> value)

Parameters

value Vector<int>

The vector whose elements will be summed (将对其元素求和的向量).

Returns

int

The sum of all elements in value (value 中所有元素的总和).

See Also
Sum<T>(Vector<T>)

Sum(Vector<uint>)

Computes the sum of all elements in a vector (计算向量中所有元素的总和). Mnemonic: rt := value[0] + value[1] + value[2] + ... + value[Count-1].

[CLSCompliant(false)]
public static uint Sum(Vector<uint> value)

Parameters

value Vector<uint>

The vector whose elements will be summed (将对其元素求和的向量).

Returns

uint

The sum of all elements in value (value 中所有元素的总和).

See Also
Sum<T>(Vector<T>)

Sum(Vector<long>)

Computes the sum of all elements in a vector (计算向量中所有元素的总和). Mnemonic: rt := value[0] + value[1] + value[2] + ... + value[Count-1].

public static long Sum(Vector<long> value)

Parameters

value Vector<long>

The vector whose elements will be summed (将对其元素求和的向量).

Returns

long

The sum of all elements in value (value 中所有元素的总和).

See Also
Sum<T>(Vector<T>)

Sum(Vector<ulong>)

Computes the sum of all elements in a vector (计算向量中所有元素的总和). Mnemonic: rt := value[0] + value[1] + value[2] + ... + value[Count-1].

[CLSCompliant(false)]
public static ulong Sum(Vector<ulong> value)

Parameters

value Vector<ulong>

The vector whose elements will be summed (将对其元素求和的向量).

Returns

ulong

The sum of all elements in value (value 中所有元素的总和).

See Also
Sum<T>(Vector<T>)