In SparseBinary, this is equivalent to update(i,v)
In SparseBinary, this is equivalent to update(i,v)
Increment by the element-wise product of ds and factor.
Increment by the element-wise product of ds and factor.
Increment given array (starting at offset index) with contents of this DoubleSeq, multiplied by factor f.
Increment given array (starting at offset index) with contents of this DoubleSeq, multiplied by factor f.
Return the index at which value i should be inserted in order to maintain sorted order.
Return the index at which value i should be inserted in order to maintain sorted order. This assumes that the existing elements already already sorted. If value i is already present, return its index.
Return the index containing the value i, or -1 if i is not found.
Return the index containing the value i, or -1 if i is not found.
Return the index containing the value i, or -1 if i is not found.
Return the index containing the value i, or -1 if i is not found. Do so more efficiently by assuming that the contents are sorted in ascending order. Look by starting near the last index as which a search was successful.
Efficient (but dangerous) direct access to underlying array of indices.
Efficient (but dangerous) direct access to underlying array of indices. Note that the array.length may be larger than the number of indices.
Append a string representation of this DoubleSeq to the StringBuilder.
Append a string representation of this DoubleSeq to the StringBuilder.
Return the values as an Array[Double].
Return the values as an Array[Double]. Not guaranteed to be a copy; in fact if it is possible to return a pointer to an internal array, it will simply return this.
With uncopied contents
With uncopied contents
The default value at indices not covered by activeDomain.
The default value at indices not covered by activeDomain. Subclasses may override this
Assumes that the values are already normalized to sum to 1.
Assumes that the values are already normalized to sum to 1.
Exponential the elements of the array such that they are normalized to sum to one, but do so efficiently by providing logZ.
Exponential the elements of the array such that they are normalized to sum to one, but do so efficiently by providing logZ. Note that to maximize efficiency, this method does not verify that the logZ value was the correct one to cause proper normalization.
Exponentiate the elements of the array, and then normalize them to sum to one.
Exponentiate the elements of the array, and then normalize them to sum to one.
Assumes that the values are already normalized to sum to 1.
Assumes that the values are already normalized to sum to 1.
Assumes that the values in both DoubleSeq are already normalized to sum to 1.
Assumes that the values in both DoubleSeq are already normalized to sum to 1.
expNormalize, then put back into log-space.
expNormalize, then put back into log-space.
Careful, for many subclasses this is inefficient because it calls the method "sum" to get the normalizer.
Careful, for many subclasses this is inefficient because it calls the method "sum" to get the normalizer.
Return the values as an Array[Double].
Return the values as an Array[Double]. Guaranteed to be a copy, not just a pointer to an internal array that would change with changes to the DoubleSeq
With copied contents
With copied contents
Return records for the n elements with the largest values.
Return records for the n elements with the largest values.