import '../../../../assert/js/assert.js';
import '../../../../globals.js';
export type F32 = number;
export type U32 = number;
export type I32 = number;
export type U8 = number;
export default class ByteEncoder {
    private _byteLength;
    private _arrayBuffer;
    private _f32Array;
    private _i32Array;
    private _u32Array;
    private _u8Array;
    constructor(arrayBuffer?: ArrayBuffer);
    get fullU8Array(): Uint8Array;
    get fullU32Array(): Uint32Array;
    get fullI32Array(): Int32Array;
    get fullF32Array(): Float32Array;
    get fullArrayBuffer(): ArrayBuffer;
    get u8Array(): Uint8Array;
    get u32Array(): Uint32Array;
    get i32Array(): Int32Array;
    get f32Array(): Float32Array;
    get arrayBuffer(): ArrayBuffer;
    clear(): void;
    pushByteEncoder(byteBuffer: ByteEncoder): void;
    pushF32(f32: F32): void;
    pushU32(u32: U32): void;
    pushI32(i32: I32): void;
    pushReversedU32(u32: U32): void;
    pushU8(u8: U8): void;
    get byteLength(): number;
    set byteLength(byteLength: number);
    private ensureSpaceFor;
    private setTypedArrays;
    resize(byteLength?: number): void;
    encodeValues<T>(values: T[], encode: (element: T, encoder: ByteEncoder) => void): this;
    decodeValues<T>(decode: (encoder: ByteEncoder, offset: number) => T, bytesPerElement: number): T[];
    static padLeft(input: string, padding: string, length: number): string;
    static padRight(input: string, padding: string, length: number): string;
    static toU32Hex(n: number): string;
    static toU32Binary(n: number): string;
    static rightShiftU32(n: number, shift: number): number;
    getDebug32String(): string;
    static alignUp(len: number, alignment: number): number;
    static nextMultipleOf(val: number, rhs: number): number;
    /**
     * Convert f32 to 4 bytes in little endian order
     */
    static f32ToBytes(float: number): U8[];
    /**
     * Convert u32 to 4 bytes in little endian order
     */
    static u32ToBytes(int: number): U8[];
    /**
     * Convert i32 to 4 bytes in little endian order
     */
    static i32ToBytes(int: number): U8[];
    /**
     * Converts an index from a normal (blocked) order to a striped order (for improved memory coherence).
     */
    static toStripedIndex(blockedIndex: number, workgroupSize: number, grainSize: number): number;
    /**
     * Converts an index from a striped order to a normal (blocked) order.
     */
    static fromStripedIndex(stripedIndex: number, workgroupSize: number, grainSize: number): number;
    /**
     * Converts to/from convergent indices (and handles the modulo-size portion)
     */
    static getConvergentIndex(index: number, size: number): number;
    /**
     * Co-rank function, that determines the indices into two arrays that would be at a given rank if they were sorted
     * together (with a binary search).
     *
     * It will return the index into the first array (A), and the index into the second array (B) would just be
     * k - result.
     *
     * For example, if we have two arrays:
     *
     * const a = [ 0, 5, 7, 7, 10, 11, 15, 16, 16, 16, 17 ];
     * const b = [ 1, 2, 5, 6, 7, 8, 9, 10, 11, 12, 13 ];
     *
     * and define our co-rank function:
     * const get = k => phet.alpenglow.ByteEncoder.getCorank( k, a.length, b.length, ( i, j ) => a[ i ] - b[ j ] );
     *
     * The following will return a sorted array of the values from both arrays:
     *
     * _.range( 0, a.length + b.length ).map( k => {
     *   if ( get( k ) !== get( k + 1 ) ) {
     *     return a[ get( k ) ];
     *   } else {
     *     return b[ k - get( k ) ]
     *   }
     * } );
     * // [0, 1, 2, 5, 5, 6, 7, 7, 7, 8, 9, 10, 10, 11, 11, 12, 13, 15, 16, 16, 16, 17]
     *
     * @param k
     * @param m
     * @param n
     * @param compare
     */
    static getCorank(k: number, m: number, n: number, compare: (aIndex: number, bIndex: number) => number): number;
}
//# sourceMappingURL=ByteEncoder.d.ts.map