Vector Methods

Methods

Abs<T> Returns a vector whose elements are the absolute values of the components of another vector.
AbsInto<T> Computes the absolute values of the elements of a vector.
AbsoluteMax<T>(Vector<T>) Returns the value of the element in this vector that has the largest absolute value.
AbsoluteMax<T>(Vector<Complex<T>>) Returns the value of the element in this vector that has the largest absolute value.
AbsoluteMax<T>(Vector<T>, Int32) Returns the value of the element in this vector that has the largest absolute value.
AbsoluteMax<T>(Vector<Complex<T>>, Int32) Returns the value of the element in this vector that has the largest absolute value.
AbsoluteMaxIndex<T> Returns the index of the component of a vector with the largest absolute value.
AbsoluteMin<T>(Vector<T>) Returns the value of the element in this vector that has the smallest absolute value.
AbsoluteMin<T>(Vector<Complex<T>>) Returns the value of the element in this vector that has the smallest absolute value.
AbsoluteMin<T>(Vector<T>, Int32) Returns the value of the element in this vector that has the smallest absolute value.
AbsoluteMin<T>(Vector<Complex<T>>, Int32) Returns the value of the element in this vector that has the smallest absolute value.
AbsoluteMinIndex<T> Returns the index of the component of a vector with the largest absolute value.
Acos<T> Computes the inverse cosine of the elements of a vector.
Acosh<T> Computes the inverse hyperbolic cosine of the elements of a vector.
AcoshInto<T> Computes the inverse hyperbolic cosine of the elements of a vector.
AcosInto<T> Computes the inverse cosine of the elements of a vector.
Add<T>(Vector<T>, T) Adds a vector and a constant.
Add<T>(Vector<T>, Vector<T>) Adds two vectors.
Add<T>(T, Vector<T>) Adds a vector and a constant.
AddInto<T>(Vector<T>, T, Vector<T>) Adds a vector and a constant.
AddInto<T>(Vector<T>, Vector<T>, Vector<T>) Adds two vectors.
AddInto<T>(T, Vector<T>, Vector<T>) Adds a vector and a constant.
AddProduct<T>(Vector<T>, LinearOperator<T>, Vector<T>) Adds the product of a matrix and a vector to a vector.
AddProduct<T>(Vector<T>, LinearOperator<T>, TransposeOperation, Vector<T>) Adds the product of a matrix and a vector to a vector.
AddProductInto<T> Adds the scaled product of a matrix and a vector to a vector.
AddScaled<T> Adds two vectors.
AddScaledInto<T> Adds two vectors.
AddScaledProduct<T>(Vector<T>, T, LinearOperator<T>, Vector<T>) Adds the scaled product of a matrix and a vector to a vector.
AddScaledProduct<T>(Vector<T>, T, LinearOperator<T>, TransposeOperation, Vector<T>) Adds the scaled product of a matrix and a vector to a vector.
AddScaledProductInto<T> Adds the scaled product of a matrix and a vector to a vector.
Align<T, U>(Vector<T>, Vector<U>) Aligns two vectors along their indexes using the default join type.
Align<T, U>(Vector<T>, Vector<U>, JoinType) Aligns two vectors along their indexes.
All(Vector<Boolean>) Returns whether all values in a vector are true.
All<T>(Vector<T>, Func<T, Boolean>) Returns whether all values in a vector satisfy the specified predicate.
All<T1, T2>(Vector<T1>, Vector<T2>, Func<T1, T2, Boolean>) Returns whether all pairs of corresponding values in two vector satisfy the specified predicate.
And Computes the logical conjunction of two boolean vectors.
Angle<T> Returns the angle between two vectors.
Any(Vector<Boolean>) Returns whether at least one value in a vector is true.
Any<T>(Vector<T>, Func<T, Boolean>) Returns whether at least one value in a vector satisfies a predicate.
Any<T1, T2>(Vector<T1>, Vector<T2>, Func<T1, T2, Boolean>) Returns whether all pairs of corresponding values in two vector satisfy the specified predicate.
Asin<T> Computes the inverse sine of the elements of a vector.
Asinh<T> Computes the inverse hyperbolic sine of the elements of a vector.
AsinhInto<T> Computes the inverse hyperbolic sine of the elements of a vector.
AsinInto<T> Computes the inverse sine of the elements of a vector.
Atan<T> Computes the inverse tangent of the elements of a vector.
Atan2<T> Computes the four-quadrant inverse tangent of the corresponding elements of two matrices.
Atan2Into<T> Computes the four-quadrant inverse tangent of the corresponding elements of two matrices.
Atanh<T> Computes the inverse hyperbolic tangent of the elements of a vector.
AtanhInto<T> Computes the inverse hyperbolic tangent of the elements of a vector.
AtanInto<T> Computes the inverse tangent of the elements of a vector.
Bin<T>(IVector, IntervalIndex<T>) Sorts values into bins and returns the result as a categorical vector.
Bin<T>(Vector<T>, IntervalIndex<T>) Sorts values into bins and returns the result as a categorical vector.
Bin<T>(IVector, IList<T>, SpecialBins) Sorts values into bins and returns the result as a categorical vector.
Bin<T>(Vector<T>, IList<T>, SpecialBins) Sorts values into bins and returns the result as a categorical vector.
Bin<T>(Vector<T>, Int32, SpecialBins) Sorts values into bins and returns the result as a categorical vector.
BrayCurtisDistance<T> Returns the Bray-Curtis distance between two vectors.
CanberraDistance<T> Returns the Canberra distance between two vectors.
Ceiling<T> Returns a vector whose elements are the components of another vector rounded up to the nearest integer.
CeilingInto<T> Computes the smallest integers greater than the elements of a vector.
Clip<T> Returns a vector whose elements are the components of a vector constrained to be within the specified interval.
ClipInto<T> Returns a vector whose elements are the components of a vector constrained to be within the specified interval.
Conjugate<T> Returns the conjugate of a vector.
ConjugateInto<T> Conjugates the elements of a vector.
Convolution<T>(Vector<T>, Vector<T>) Calculates the convolution of two vectors.
Convolution<T>(Vector<Complex<T>>, Vector<Complex<T>>) Calculates the convolution of two vectors.
CorrelationDistance<T> Returns a distance that is a function of the correlation between two vectors.
Cos<T> Computes the cosine of the elements of a vector.
Cosh<T> Computes the hyperbolic cosine of the elements of a vector.
CoshInto<T> Computes the hyperbolic cosine of the elements of a vector.
CosineDistance<T> Returns the cosine of the angle between two vectors.
CosInto<T> Computes the cosine of the elements of a vector.
CountFalse Returns the number of elements in a boolean vector that are false.
CountTrue Returns the number of elements in a boolean vector that are true.
Create<T>(T[]) Constructs a new vector with the specified elements.
Create<T>(Int32) Constructs a new vector with the specified length.
Create<T>(IList<T>, ArrayMutability) Constructs a new vector with the specified elements.
Create<T>(T[], Boolean, ArrayMutability) Constructs a new dense vector with the specified elements.
Create<T>(Int32, ArraySlice<T>, ArrayMutability) Constructs a new dense vector.
Create<T>(Int32, Func<Int32, T>, ArrayMutability) Constructs a new dense vector.
Create<T>(Int32, T[], Boolean, ArrayMutability) Constructs a new dense vector with the specified elements.
Create<T>(Int32, T[], Int32, Int32, ArrayMutability) Constructs a new dense vector.
Create<T, K>(IDictionary<K, T>) Creates an indexed vector from a dictionary.
Create<T, K>(IDictionary<K, T>, IList<K>) Creates an indexed vector from a dictionary.
Create<T, K>(Int32, Index<K>) Creates an indexed vector of the specified length with the specified index.
Create<T, K>(IList<T>, IList<K>, ArrayMutability) Creates an indexed vector with the specified values and corresponding keys.
CreateBanded<T>(Int32, Int32, Int32) Constructs a new BlockVector<T> with the specified length and non-zero range.
CreateBanded<T>(Int32, Int32, Int32, T[], Boolean, ArrayMutability) Constructs a new BlockVector<T> with the specified length and non-zero elements.
CreateCategorical<T>(IList<T>) Constructs a categorical vector from a list of values.
CreateCategorical<T>(Int32) Constructs a new categorical vector of the specified length.
CreateCategorical<T>(IList<T>, ArrayMutability) Constructs a categorical vector from a list of values.
CreateCategorical<T>(IList<T>, Index<T>, ArrayMutability) Constructs a categorical vector from a list of values.
CreateCategorical<T>(IList<T>, SortOrder, ArrayMutability) Constructs a categorical vector from a list of values.
CreateCategorical<T>(Index<T>, IList<Int32>, ArrayMutability) Constructs a categorical vector from an index and level indexes.
CreateConstant<T> Constructs a new constant vector.
CreateIndexed<T>(T[], Int32[], ArrayMutability) Constructs a new indexed vector.
CreateIndexed<T>(Int32, T[], Int32[], Int32, Int32, ArrayMutability) Constructs a new vector whose elements are at the specified indexes in an array.
CreateLogarithmicRange<T>(Int32, Int32, ArrayMutability) Constructs a new vector with elements evenly spaced in a base 10 logarithmic scale.
CreateLogarithmicRange<T>(T, Int32, Int32, ArrayMutability) Constructs a new vector with elements evenly spaced in a logarithmic scale.
CreateLogarithmicRange<T>(Int32, T, T, T, Boolean, ArrayMutability) Constructs a new vector with elements evenly spaced in a logarithmic scale.
CreateRandom(Int32, ArrayMutability) Constructs a new vector with uniform random numbers between 0 and 1.
CreateRandom(Int32, Random, ArrayMutability) Constructs a new vector with uniform random numbers between 0 and 1.
CreateRandomNormal(Int32, ArrayMutability) Constructs a new vector with normal random numbers with zero mean and unit standard deviation.
CreateRandomNormal(Int32, Random, ArrayMutability) Constructs a new vector with normal random numbers with zero mean and unit standard deviation.
CreateRange<T>(T, ArrayMutability) Constructs a new vector with elements from 0 up to the specified value.
CreateRange<T>(T, T, ArrayMutability) Constructs a new vector with elements from the specified range..
CreateRange<T>(T, T, Int32, ArrayMutability) Constructs a new vector with elements from the specified range..
CreateRange<T>(T, T, Int32, Boolean, ArrayMutability) Constructs a new vector with elements from the specified range..
CreateSparse<T>(Int32) Constructs a new sparse vector of the specified length.
CreateSparse<T>(Int32, Double) Constructs a new sparse vector of the specified length.
CreateSparse<T>(Int32, Int32) Constructs a new sparse vector of the specified length.
CreateSparse<T>(Int32, Int32[], T[], ArrayMutability) Constructs a new sparse vector with the specified elements.
CreateSparseUnitVector<T> Constructs a new sparse vector of the specified length.
CrossProduct<T> Returns the cross product of two 3D vectors.
Difference<T> Computes the forward or backward difference of a vector.
DifferenceInto<T> Computes the forward or backward difference of a vector.
Divide<T> Divides a vector by a constant.
DotProduct<T> Returns the dot product of two vectors.
ElementwiseConjugateMultiply<T> Multiplies the elements of a vector by the corresponding elements of another vector.
ElementwiseConjugateMultiplyInto<T> Multiplies a vector element-wise by another vector.
ElementwiseDivide<T>(Vector<T>, Vector<T>) Divides a vector element-wise by another vector.
ElementwiseDivide<T>(T, Vector<T>) Divides a scalar by each element of a vector.
ElementwiseDivideInto<T>(Vector<T>, Vector<T>, Vector<T>) Divides a vector element-wise by another vector.
ElementwiseDivideInto<T>(T, Vector<T>, Vector<T>) Divides a scalar by each element of a vector.
ElementwiseMultiply<T> Multiplies the elements of a vector by the corresponding elements of another vector.
ElementwiseMultiplyInto<T> Multiplies a vector element-wise by another vector.
ElementwisePow<T>(Vector<T>, T) Raises the element of a vector to a constant power.
ElementwisePow<T>(Vector<T>, Vector<T>) Raises the elements of a vector to a power from the corresponding elements in another vector.
ElementwisePow<T>(Vector<T>, Vector<Int32>) Raises the elements of a vector to an integer power from the corresponding elements in another vector.
ElementwisePow<T>(Vector<T>, Int32) Raises the element of a vector to a constant power.
ElementwisePowInto<T>(Vector<T>, T, Vector<T>) Raises the element of a vector to a constant power.
ElementwisePowInto<T>(Vector<T>, Vector<T>, Vector<T>) Raises the elements of a vector to a power from the corresponding elements in another vector.
ElementwisePowInto<T>(Vector<T>, Vector<Int32>, Vector<T>) Raises the elements of a vector to an integer power from the corresponding elements in another vector.
ElementwisePowInto<T>(Vector<T>, Int32, Vector<T>) Raises the element of a vector to a constant power.
EqualTo<T>(Vector<T>, T) Checks if the elements of one vector are equal to a constant.
EqualTo<T>(Vector<T>, Vector<T>) Checks if the elements of one vector are equal to the corresponding elements of another vector.
EqualTo<T>(T, Vector<T>) Checks if the elements of one vector are equal to a constant.
EqualToInto<T>(T, Vector<T>, Vector<Boolean>) Checks if the elements of one vector are equal to a constant.
EqualToInto<T>(Vector<T>, T, Vector<Boolean>) Checks if the elements of one vector are equal to a constant.
EqualToInto<T>(Vector<T>, Vector<T>, Vector<Boolean>) Checks if the elements of one vector are equal to the corresponding elements of another vector.
EuclideanDistance<T> Returns the classic Euclidean distance between two vectors.
Exp<T> Computes the exponential of the elements of a vector.
ExpInto<T> Computes the exponential of the elements of a vector.
Floor<T> Returns a vector whose elements are the components of another vector rounded down to the nearest integer.
FloorInto<T> Computes the largest integers smaller than the elements of a vector.
FourierTransform<T>(Vector<T>) Returns the Fourier transform of a vector.
FourierTransform<T>(Vector<Complex<T>>) Returns the Fourier transform of a vector.
GreaterThan<T>(Vector<T>, T) Checks if the elements of one vector are greater than a constant.
GreaterThan<T>(Vector<T>, Vector<T>) Checks if the elements of one vector are greater than the corresponding elements of another vector.
GreaterThan<T>(T, Vector<T>) Checks if the elements of one vector are greater than a constant.
GreaterThanInto<T>(T, Vector<T>, Vector<Boolean>) Checks if the elements of one vector are greater than a constant.
GreaterThanInto<T>(Vector<T>, T, Vector<Boolean>) Checks if the elements of one vector are greater than a constant.
GreaterThanInto<T>(Vector<T>, Vector<T>, Vector<Boolean>) Checks if the elements of one vector are greater than the corresponding elements of another vector.
GreaterThanOrEqualTo<T>(Vector<T>, T) Checks if the elements of one vector are greater than or equal to a constant.
GreaterThanOrEqualTo<T>(Vector<T>, Vector<T>) Checks if the elements of one vector are greater than or equal to the corresponding elements of another vector.
GreaterThanOrEqualTo<T>(T, Vector<T>) Checks if the elements of one vector are greater than or equal to a constant.
GreaterThanOrEqualToInto<T>(T, Vector<T>, Vector<Boolean>) Checks if the elements of one vector are greater than or equal to a constant.
GreaterThanOrEqualToInto<T>(Vector<T>, T, Vector<Boolean>) Checks if the elements of one vector are greater than or equal to a constant.
GreaterThanOrEqualToInto<T>(Vector<T>, Vector<T>, Vector<Boolean>) Checks if the elements of one vector are greater than or equal to the corresponding elements of another vector.
Hypot<T> Computes the square root of the sum of the squared corresponding elements of two matrices.
HypotInto<T> Computes the square root of the sum of the squared corresponding elements of two matrices.
InverseComplexFourierTransform<T> Returns the inverse Fourier transform of a vector.
InverseFourierTransform<T> Returns the inverse Fourier transform of a vector.
Join<T>(Vector<T>[]) Joins vectors together to form one large vector.
Join<T>(Vector<T>, Vector<T>) Joins two vectors.
LessThan<T>(Vector<T>, T) Checks if the elements of one vector are less than a constant.
LessThan<T>(Vector<T>, Vector<T>) Checks if the elements of one vector are less than the corresponding elements of another vector.
LessThan<T>(T, Vector<T>) Checks if the elements of one vector are less than a constant.
LessThanInto<T>(T, Vector<T>, Vector<Boolean>) Checks if the elements of one vector are less than a constant.
LessThanInto<T>(Vector<T>, T, Vector<Boolean>) Checks if the elements of one vector are less than a constant.
LessThanInto<T>(Vector<T>, Vector<T>, Vector<Boolean>) Checks if the elements of one vector are greater than the corresponding elements of another vector.
LessThanOrEqualTo<T>(Vector<T>, T) Checks if the elements of one vector are less than or equal to a constant.
LessThanOrEqualTo<T>(Vector<T>, Vector<T>) Checks if the elements of one vector are less than or equal to the corresponding elements of another vector.
LessThanOrEqualTo<T>(T, Vector<T>) Checks if the elements of one vector are less than or equal to a constant.
LessThanOrEqualToInto<T>(T, Vector<T>, Vector<Boolean>) Checks if the elements of one vector are less than or equal to a constant.
LessThanOrEqualToInto<T>(Vector<T>, T, Vector<Boolean>) Checks if the elements of one vector are less than or equal to a constant.
LessThanOrEqualToInto<T>(Vector<T>, Vector<T>, Vector<Boolean>) Checks if the elements of one vector are greater than or equal to the corresponding elements of another vector.
Log<T>(Vector<T>) Returns a vector whose elements are the logarithms of the components of another vector.
Log<T>(Vector<T>, T) Returns a vector whose elements are the logarithms of the components of another vector.
Log10<T> Returns a vector whose elements are the base 10 logarithms of the components of another vector.
Log10Into<T> Computes the base 10 logarithm of the elements of a vector.
LogInto<T>(Vector<T>, Vector<T>) Computes the logarithm of the elements of a vector.
LogInto<T>(Vector<T>, T, Vector<T>) Computes the logarithm of the elements of a vector.
ManhattanDistance<T> Returns the Manhattan (city block) distance between two vectors.
Map<T, U>(Func<T, U>, Vector<T>) Applies a function to the elements of a vector and returns the result in a new vector.
Map<T, U>(Func<Int32, T, U>, Vector<T>) Applies a function to the elements of a vector and returns the result in a new vector.
Map<T, U, V>(Func<T, U, V>, Vector<T>, Vector<U>) Applies a function to the corresponding elements of two vectors and returns the result in a new vector.
MapInto<T, U>(Func<T, U>, Vector<T>, Vector<U>) Applies a function to the elements of a vector.
MapInto<T, U, V>(Func<T, U, V>, Vector<T>, Vector<U>, Vector<V>) Applies a function to the corresponding elements of two vectors and returns the result in a third vector.
Max<T>(Vector<T>) Returns the value of the largest component of a vector.
Max<T>(Vector<T>, T) Returns a vector whose elements are the maximum of the components of a vector and a real number.
Max<T>(Vector<T>, Vector<T>) Returns a vector whose elements are the maximums of the components of two vectors.
Max<T>(T, Vector<T>) Returns a vector whose elements are the maximum of the components of a vector and a real number.
MaximumDistance<T> Returns the largest distance between two vectors.
MaxIndex<T> Returns the index of the largest component of a vector.
MaxInto<T>(Vector<T>, T, Vector<T>) Returns a vector whose elements are the maximum of the components of a vector and a real number.
MaxInto<T>(Vector<T>, Vector<T>, Vector<T>) Returns a vector whose elements are the maximums of the components of two vectors.
Min<T>(Vector<T>) Returns the value of the smallest component of a vector.
Min<T>(Vector<T>, T) Returns a vector whose elements are the minimum of the components of a vector and a real number.
Min<T>(Vector<T>, Vector<T>) Returns a vector whose elements are the minimums of the components of two vectors.
Min<T>(T, Vector<T>) Returns a vector whose elements are the minimum of the components of a vector and a real number.
MinIndex<T> Returns the index of the smallest component of a vector.
MinInto<T>(Vector<T>, T, Vector<T>) Returns a vector whose elements are the minimum of the components of a vector and a real number.
MinInto<T>(Vector<T>, Vector<T>, Vector<T>) Returns a vector whose elements are the minimums of the components of two vectors.
MinkowskiMeasure<T> Returns the Minkowski distance between two vectors.
Multiply<T>(Matrix<T>, Vector<T>) Multiplies a vector by a matrix.
Multiply<T>(Vector<T>, T) Multiplies a vector by a constant.
Multiply<T>(T, Vector<T>) Multiplies a vector by a constant.
Multiply<T>(Matrix<T>, TransposeOperation, Vector<T>) Multiplies a vector by a matrix.
MultiplyInto<T>(Matrix<T>, Vector<T>, Vector<T>) Multiplies a vector by a matrix.
MultiplyInto<T>(Vector<T>, T, Vector<T>) Multiplies a vector by a constant.
MultiplyInto<T>(T, Vector<T>, Vector<T>) Multiplies a vector by a constant.
MultiplyInto<T>(Matrix<T>, TransposeOperation, Vector<T>, Vector<T>) Multiplies a vector by a matrix.
Negate<T> Negates a vector.
NegateInto<T> Negates a vector.
Not Computes the logical negation of a boolean vector.
NotEqualTo<T>(Vector<T>, T) Checks if the elements of one vector are not equal to a constant.
NotEqualTo<T>(Vector<T>, Vector<T>) Checks if the elements of one vector are not equal to the corresponding elements of another vector.
NotEqualTo<T>(T, Vector<T>) Checks if the elements of one vector are not equal to a constant.
NotEqualTo<T>(Vector<T>, Vector<T>, Vector<Boolean>) Checks if the elements of one vector are not equal to the corresponding elements of another vector.
NotEqualToInto<T>(T, Vector<T>, Vector<Boolean>) Checks if the elements of one vector are not equal to a constant.
NotEqualToInto<T>(Vector<T>, T, Vector<Boolean>) Checks if the elements of one vector are not equal to a constant.
Or Computes the logical disjunction of two boolean vectors.
Permute<T> Permutes a vector.
Product<T> Returns the product of the components of a vector.
Project<T> Returns the projection of one vector onto another.
Reciprocal<T> Returns a vector whose elements are the inverses (reciprocals) of the components of another vector.
ReciprocalInto<T> Computes the inverses (reciprocals) of the elements of a vector.
Round<T> Returns a vector whose elements are the components of another vector rounded to the nearest integer.
Sin<T> Computes the sine of the elements of a vector.
Sinh<T> Computes the hyperbolic sine of the elements of a vector.
SinhInto<T> Computes the hyperbolic sine of the elements of a vector.
SinInto<T> Computes the sine of the elements of a vector.
Sort<T>(Vector<T>) Sorts a vector in ascending order.
Sort<T>(Vector<T>, SortOrder) Sorts a vector in the specified order.
Sort<T>(Vector<T>, SortOrder, Permutation) Sorts a vector in the specified order and also returns the sorting permutation.
SplitBy<T>(Vector<T>, IGrouping) Splits a vector according to the specified grouping.
SplitBy<T>(Vector<T>, ICategoricalVector) Splits a vector according to the specified grouping.
Sqrt<T> Computes the square root of the elements of a vector.
SqrtInto<T> Computes the square root of the elements of a vector.
SquaredDifference<T> Returns the norm of the difference of two vectors.
SquaredEuclideanDistance<T> Returns the square of the Euclidean distance between two vectors.
Subtract<T>(Vector<T>, T) Subtracts a constant from a vector.
Subtract<T>(Vector<T>, Vector<T>) Subtracts two vectors.
Subtract<T>(T, Vector<T>) Subtracts a vector from a constant.
SubtractInto<T>(Vector<T>, T, Vector<T>) Subtracts two vectors.
SubtractInto<T>(Vector<T>, Vector<T>, Vector<T>) Subtracts one vector from another.
SubtractInto<T>(T, Vector<T>, Vector<T>) Subtracts a vector from a constant.
Sum<T> Returns the sum of the components of a vector.
Swap<T> Swaps the elements of two vectors.
Tan<T> Computes the tangent of the elements of a vector.
Tanh<T> Computes the hyperbolic tangent of the elements of a vector.
TanhInto<T> Computes the hyperbolic tangent of the elements of a vector.
TanInto<T> Computes the tangent of the elements of a vector.
Xor Computes the exclusive disjunction of two boolean vectors.

See Also