View this Vector as an array with full read and write access.
View this Vector as an array with full read and write access.
The "ballness" of the dyad.
The "ballness" of the dyad. Not sure if neg can result, so clip.
Helper for equals.
Helper for equals.
Compute the dot product of "this" and "that".
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
Reverses the order of the elements in this
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.
The orientation of the dyad in radians.
Tensor accessor.
Reduce a Vector to a scalar using "f".
Reduce a Vector to a scalar using "f".
Rotate the dyad by "angle", expressed in radians.
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).
Sort vector elements in ascending order (creates new Vector, "this" unchanged).
The "stickness" of the dyad.
Convert Vector to an array of doubles (copy).
Convert Vector to an array of doubles (copy).
Trim "this" to a Vector of length smallSize
.
Trim "this" to a Vector of length smallSize
.
The "xx" component of the dyad (see class description).
The "xy" component of the dyad (see class description).
The "yy" component of the dyad (see class description).
A two-dimensional dyad.
The terminology of "stickness" and "ballness" is described in "An efficient method for tensor voting using steerable filters," Franken et al.
Since dyads in Cog are symmetric matrices, we implement them as vectors for efficiency. The matrix representation:
is therefore represented internally as a vector like this: