IntBuffer
Specialized MutableBuffer implementation over IntArray.
Functions
Creates an n × 1 VirtualMatrix, where n is the size of the given buffer.
Resize original buffer to a given range using given range, filling additional segments with defaultValue. Range left border could be negative to designate adding new blank segment to the beginning of the buffer
Return a new array filled with buffer indices. Indices order is defined by sorting associated buffer value. This feature allows sorting buffer values without reordering its content.
Iterates over all elements.
Create a new buffer from this one with the given mapping (indexed) function. Provided bufferFactory is used to construct the new buffer.
Create a new buffer from this one with the given mapping function. Provided bufferFactory is used to construct the new buffer.
Checks that the Buffer is sorted (ascending) and throws IllegalArgumentException if it is not.
Create a zero-copy virtual buffer that contains the same elements but in descending order
Multiplies a vector by its element.
Multiplies this element by scalar.
Multiplication of this element by a scalar.
Returns a new DoubleArray containing all the elements of this Buffer.
Represent this buffer as DoubleBuffer. Does not guarantee that changes in the original buffer are reflected on this buffer.
Returns a new FloatArray containing all the elements of this Buffer.
Returns a new MutableList filled with all elements of this buffer. NOTE: this method uses a protective copy, so it should not be used in performance-critical code.
Returns a new ShortArray containing all the elements of this Buffer.
Returns a new Array containing all elements of this buffer. NOTE: this method uses a protective copy, so it should not be used in performance-critical code.
The negation of this element.