Defined in File Vector.hpp
The Vector class represents a basic vector with double coefficients.
Public Functions
Default constructor
Constructs the Vector with dimension elements with value initialValue.
dimension – The dimension of this vector.
initialValue – All coefficients will be initialized to initialValue.
transpose – Indicates whether this vector is transposed (row vector) or not (column vector).
Constructs the Vector with the contents of values.
values – The values of this Vector.
transpose – Indicates whether this vector is transposed (row vector) or not (column vector).
Constructs the Vector from the contents of the initializer list list.
list – The initializer list.
A transposed vector is a row vector.
True, if this vector is transposed, otherwise false.
Calculates and returns the Euclidean length of this vector
The Euclidean length of this vector.
Calculates and returns the arithmetic mean of this vector
The arithmetic mean of this vector.
Returns a reference to the element at index idx without checking the range of this vector.
idx – The index of the element.
Reference to the element at index idx.
Assigns the given value to all the elements in the vector.
val – The value to be assigned.
Returns the element at index idx without checking the range of this vector. idx The index of the element.
Constant reference to the element at index idx.
Returns a reference to the element at index idx. If idx is not a valid index an exception is thrown.
idx – The index of the element.
Reference to the element at index idx.
Compares this vector and other element-wise.
True, if this vector is element-wise equal to other, otherwise false.
Compares this vector and other element-wise.
True, if this vector is element-wise unequal to other, otherwise false.
Computes the inner product (dot product) of this vector and other.
The result of the inner product.
Multiplies this vector with matrix and returns the result.
The result of multiplying this vector with matrix.
Multiplies this vector with a scalar specified in scalar and returns the result in a new vector.
The result of multiplying this vector with scalar.
Divides this vector by a divisor specified in divisor and returns the result in a new vector.
The result of dividing this vector by divisor.
Divides this vector by a divisor specified in divisor.
Reference to this vector.
Adds this vector to other and returns the result. Note that the dimensions of the vectors have to be the same.
The sum of this vector and other.
Adds value to each element of this vector and returns the result.
Adds other to this vector. Note that the dimensions of the vectors have to be the same.
Reference to this vector.
Subtracts other from this vector and returns the result. Note that the dimensions of the vectors have to be the same.
The difference of this vector and other.
Subtracts value from each element of this vector and returns the result.
Subtracts other from this vector. Note that the dimensions of the vectors have to be the same.
Reference to this vector.
Applies the unary function unaryElementFunction to each value in the Vector. Note that it must hold that the function applied to the zero element of this matrix returns the zero element.
unaryElementFunction –
Iterate over all elements of the vector and call handler (lambda closure).
Iterate over all elements of the vector and call handler (lambda closure).
Public Static Functions
Computes the outer product of v1 and v2.