Create a vector from a 1-dimensional tensor.
Create a vector from one or more Floats.
Create a vector of size "length".
View this Vector as an array with full read and write access.
Helper for equals.
Helper for equals.
Compute the dot product of "this" and "that".
Test "this" and "other" for deep equality.
Test "this" and "other" for deep equality. Allows "==" to work.
Expand the vector, optionally extending the border into the expanded region.
Expand the vector, optionally extending the border into the expanded region. This operation is a key part of the FFT. The new vector is of size "bigSize" element (0) of this is anchored at (0) in the larger vector. If "borderFill" is true, then the two edges of the vector are extended evenly in all directions, as though the bigger vector were actually a loop with opposite edges touching.
Reverses the order of the elements in this
Get the data in the tensor, flattened to a linear array.
Get the data in the tensor, flattened to a linear array.
Required because of overriding equals.
Required because of overriding equals.
The number of "numbers" held in the tensor.
The number of "numbers" held in the tensor.
Tensor accessor.
Reduce a Vector to a scalar using "f".
Shape of the vector.
Rotates the elements of a vector, wrapping around the left side to the right side.
Rotates the elements of a vector, wrapping around the left side to the right side.
The rotation is specified by "delta"; for example, delta=2 would cause the element at location (0) to be moved to location (2). Returns the rotated vector. This was added in support of the LowPassFunction kernel, and because Matrix has a similar method. Not currently tested. -RJC XXX
Sort vector elements in ascending order (creates new Vector, "this" unchanged).
Convert Vector to an array of doubles (copy).
Trim "this" to a Vector of length smallSize
.
A column vector.
The interface is modeled on that provided by Scalala (which in turn was modeled on Matlab), with the exception that all operations are executed immediately. This provides a more natural interface, at the cost of suboptimal performance since linear algebra libraries are not used.
In the following descriptions, "v" represents a vector, "s" a scalar, "m" a matrix, "b" a boolean, "i" and integer, "d" a double. The update operations, such as "+=", update the elements of the vector in place.