Alias for :%(b) when b is a scalar.
Alias for :%(b) when b is a scalar.
Alias for :%=(b) when b is a scalar.
Alias for :%=(b) when b is a scalar.
Alias for :&&(b) for all b.
Alias for :&&(b) for all b.
Mutates this by element-wise and of this and b.
Mutates this by element-wise and of this and b.
Matrix multiplication
Matrix multiplication
Alias for :*=(b) when b is a scalar.
Alias for :*=(b) when b is a scalar.
Alias for :+(b) for all b.
Alias for :+(b) for all b.
Alias for :+=(b) for all b.
Alias for :+=(b) for all b.
Alias for :-(b) for all b.
Alias for :-(b) for all b.
Alias for :-=(b) for all b.
Alias for :-=(b) for all b.
Alias for :/(b) when b is a scalar.
Alias for :/(b) when b is a scalar.
Alias for :/=(b) when b is a scalar.
Alias for :/=(b) when b is a scalar.
Element-wise inequality comparator of this and b.
Element-wise inequality comparator of this and b.
Element-wise modulo of this and b.
Element-wise modulo of this and b.
Mutates this by element-wise modulo of b into this.
Mutates this by element-wise modulo of b into this.
Element-wise logical "and" operator -- returns true if corresponding elements are non-zero.
Element-wise logical "and" operator -- returns true if corresponding elements are non-zero.
Mutates this by element-wise and of this and b.
Mutates this by element-wise and of this and b.
Element-wise product of this and b.
Element-wise product of this and b.
Mutates this by element-wise multiplication of b into this.
Mutates this by element-wise multiplication of b into this.
Element-wise sum of this and b.
Element-wise sum of this and b.
Mutates this by element-wise addition of b into this.
Mutates this by element-wise addition of b into this.
Element-wise difference of this and b.
Element-wise difference of this and b.
Mutates this by element-wise subtraction of b from this
Mutates this by element-wise subtraction of b from this
Element-wise quotient of this and b.
Element-wise quotient of this and b.
Mutates this by element-wise division of b into this
Mutates this by element-wise division of b into this
Element-wise less=than comparator of this and b.
Element-wise less=than comparator of this and b.
Element-wise less-than-or-equal-to comparator of this and b.
Element-wise less-than-or-equal-to comparator of this and b.
Mutates this by element-wise assignment of b into this.
Mutates this by element-wise assignment of b into this.
Element-wise equality comparator of this and b.
Element-wise equality comparator of this and b.
Element-wise greater-than comparator of this and b.
Element-wise greater-than comparator of this and b.
Element-wise greater-than-or-equal-to comparator of this and b.
Element-wise greater-than-or-equal-to comparator of this and b.
Element-wise exponentiation of this and b.
Element-wise exponentiation of this and b.
Mutates this by element-wise exponentiation of this by b.
Mutates this by element-wise exponentiation of this by b.
Element-wise logical "xor" operator -- returns true if only one of the corresponding elements is non-zero.
Element-wise logical "xor" operator -- returns true if only one of the corresponding elements is non-zero.
Mutates this by element-wise xor of this and b.
Mutates this by element-wise xor of this and b.
Element-wise logical "or" operator -- returns true if either element is non-zero.
Element-wise logical "or" operator -- returns true if either element is non-zero.
Mutates this by element-wise or of this and b.
Mutates this by element-wise or of this and b.
Shaped solve of this by b.
Shaped solve of this by b.
Alias for :^^(b) for all b.
Alias for :^^(b) for all b.
Mutates this by element-wise xor of this and b.
Mutates this by element-wise xor of this and b.
Method for slicing that is tuned for Matrices.
Slice a sequence of elements.
Slice a sequence of elements. Must be at least 2.
method for slicing a tensor.
method for slicing a tensor. For instance, DenseVectors support efficient slicing by a Range object.
Returns the k indices with maximum value.
Returns the k indices with maximum value. (NOT absolute value.)
how many to return
Inner product of this and b.
Inner product of this and b.
Returns all indices k whose value satisfies a predicate.
Returns all indices k whose value satisfies a predicate.
Returns true if and only if the given predicate is true for all elements.
Returns true if and only if the given predicate is true for all elements.
Returns true if and only if the given predicate is true for all elements.
Returns true if and only if the given predicate is true for all elements.
Applies the given function to each key in the tensor.
Applies the given function to each key in the tensor.
Applies the given function to each key and its corresponding value.
Applies the given function to each key and its corresponding value.
Applies the given function to each value in the map (one for each element of the domain, including zeros).
Applies the given function to each value in the map (one for each element of the domain, including zeros).
the set of keys in this vector (0 until length)
Maps all active key-value pairs values.
Maps all active key-value pairs values.
Maps all non-zero values.
Maps all non-zero values.
Creates a new map containing a transformed copy of this map.
Creates a new map containing a transformed copy of this map.
Creates a new map containing a transformed copy of this map.
Creates a new map containing a transformed copy of this map.
Represents the norm of this vector
Represents the norm of this vector
Represents the "natural" norm of this vector, for types that don't support arbitrary norms
Represents the "natural" norm of this vector, for types that don't support arbitrary norms
A transposed view of this object, followed by a slice.
A transposed view of this object, followed by a slice. Sadly frequently necessary.
A transposed view of this object.
A transposed view of this object.
Invalidates the cache and then updates the value at index i
with value v
.
Invalidates the cache and then updates the value at index i
with value v
.
Alias for :||(b) for all b.
Alias for :||(b) for all b.
Mutates this by element-wise or of this and b.
Mutates this by element-wise or of this and b.
Returns true if all elements are non-zero
Returns true if all elements are non-zero
(Since version 0.6) Use breeze.linalg.all instead
Returns true if some element is non-zero
Returns true if some element is non-zero
(Since version 0.6) Use breeze.linalg.any instead
This decorator automatically caches the norm and sums of a vector and invalidates the cache whenever the vector is updated. It can be applied to any
Vector
such asDenseVector
orSparseVector
. Calls for the norm or sum after the initial request will have a O(1) run time. Calls toupdate
will have a slight constant overhead used to invalidate the cache. This wrapper is especially beneficial for vectors that are rarely updated but frequently use the aggregate values, such as in cosine similarity.Note that changing the backing datastructure of the
Vector
without usingupdate
will produce undefined behavior.