Vectors¶
Predicates¶
|
Returns if x is a scalar |
|
Returns if x is a line vector or row vector or column vector |
|
Returns if x is a line vector |
|
Returns if x is a row vector |
|
Returns if x is a column vector |
Returns if x is a vector with (strictly) increasing values |
|
Returns if x is a vector with (strictly) decreasing values |
|
Returns if x is a vector with non-increasing values |
|
Returns if x is a vector with non-decreasing values |
|
Returns if x is a vector with equal values |
Unary Operations¶
|
Converts a line vector to a row vector |
|
Converts a line vector to a column vector |
|
Returns a unit vector in i-th dimension for the standard coordinate system |
Right shift the contents of the vector |
|
Circular right shift the contents of the vector |
|
Left shift the contents of the vector |
|
Circular left shift the contents of the vector |
|
|
Right shift the contents of the vector by n places |
|
Circular right shift the contents of the vector by n places |
|
Left shift the contents of the vector by n places |
|
Circular left shift the contents of the vector by n places |
|
Extends a vector by repeating it at the end (periodic extension) |
|
Extends a vector by repeating it at the start (periodic extension) |
|
Returns the central part of a vector of a specified length |
|
Returns a unit vector in i-th dimension for the standard coordinate system |
|
Extends a vector by repeating it at the end (periodic extension) |
|
Extends a vector by repeating it at the start (periodic extension) |
|
Returns the central part of a vector of a specified length |
|
Swaps two entries in a vector |
Norm¶
|
Computes the l_1 norm of a vector |
|
Computes the l_2 norm of a vector |
|
Computes the l_inf norm of a vector |
|
Computes the squared l_2 norm of a vector |
|
Normalizes a vector by its l_1-norm |
|
Normalizes a vector by its l_2-norm |
Normalizes a vector by its l_inf-norm |
Circular Buffer¶
|
Left shift the contents of the vector |
|
Left shift the contents of the vector |
Binary Heap¶
|
Checks if x is a min heap |
|
Checks if x is a max heap |
|
Returns the index of the left child |
|
Returns the index of the right child |
|
Returns the parent index for an index |
Converts x into a max heap |
|
|
Return the index of the largest value between a parent and its children |
|
Heapifies a subtree starting from a given node |
Removes the top element from a max heap retaining its heap structure |
Miscellaneous¶
|
Returns the coefficients in the descending order of magnitude |
|
Computes a probability mass function from a given vector |
|
Computes a cumulative mass function from a given vector |
|
Returns the index of a given quantile in a CMF |
Returns the number of largest components containing a given percentage of energy |