Click or drag to resize

Extensions

Hereinafter the following convention is used:

  • VSmall Greek – small Greek letters are used to denote scalars;

  • VSmall Latin – small Latin letters are used to denote vectors;

  • VCapital Latin – capital Latin letters are used to denote matrices.

Concatenation

This section describes methods applied to concatenate two vectors. Concatenation is the joining of two vectors in one vector.

Operation

Description

Performance

concatenate

Concatenates two given vectors.

Consider we have vectors:

VConcatU and VConcatV.

The result will be VConcat Res

Returning result:

StaticConcatenate(Vector, Vector)

Out of place:

StaticConcatenate(Vector, Vector, Vector)

Permutation

Permutation is a procedure that changes order of vector elements. User specifies the sequence, in which the elements of the vector will be placed after the permutation. Obviously, the specified array must have the same number of elements as the given vector.

Consider the given vector is VPermute Ex

C#
1IntegerArray order = new IntegerArray {1, 4, 0, 2, 3};
2u.Permute(order);

The result will be: VPermute Ex Res

Operation

Description

Performance

permutation

Permutes elements of the vector.

methodPermute(IntegerArray)

Useful Routines

This section describes some other useful methods.

Operation

Description

Performance

clear the vector

Sets all elements of this vector to zero.

methodClear

normalize

Divides each element of the vector onto the norm.

VNormalize

methodClear

negate

Negates all elements of this vector.

VNegate

methodNegate

add scaled vector

Adds another vector multiplied by given scalar to this one.

VAdd Scaled

In place:

methodAddScaledVectorInPlace(Double, Vector)

Returning result:

methodAddScaledVector(Double, Vector)

Out of place:

methodAddScaledVector(Double, Vector, Vector)

matrix-vector product

Computes the matrix-vector product in general form. It multiplies this vector u by scalar β and adds product of matrix and vector v scaled by another scalar α.

VMatrix Vector Prod 1

User may specify if the matrix should be transposed or not with boolean parameter:

VMatrix Vector Prod 2

methodGeneralMatrixVectorMultiply(Double, Matrix, Boolean, Vector, Double)

See Also