import { Int16Buffer, Int32Buffer, Int64Buffer, Int8Buffer, Uint16Buffer, Uint32Buffer, Uint64Buffer, Uint8Buffer } from '@rapidsai/cuda'; import { MemoryResource } from '@rapidsai/rmm'; import { Scalar } from '../scalar'; import { Series } from '../series'; import { Int16, Int32, Int64, Int8, Integral, Uint16, Uint32, Uint64, Uint8, Utf8String } from '../types/dtypes'; import { CommonType } from '../types/mappings'; import { Float64Series } from './float'; import { NumericSeries } from './numeric'; import { StringSeries } from './string'; /** * A base class for Series of 8, 16, 32, or 64-bit integral values in GPU memory. */ declare abstract class IntSeries extends NumericSeries { _castAsString(memoryResource?: MemoryResource): StringSeries; /** * Returns a new string Series converting integer columns to hexadecimal characters. * * Any null entries will result in corresponding null entries in the output series. * * The output character set is '0'-'9' and 'A'-'F'. The output string width will be a multiple of * 2 depending on the size of the integer type. A single leading zero is applied to the first * non-zero output byte if it less than 0x10. * * Leading zeros are suppressed unless filling out a complete byte as in 1234 -> 04D2 instead of * 000004D2 or 4D2. * * @param memoryResource The optional MemoryResource used to allocate the result Series' device * memory. */ toHexString(memoryResource?: MemoryResource): Series; /** * Perform a binary `&` operation between this Series and another Series or scalar value. * * @param rhs The other Series or scalar to use. * @returns A Series of a common numeric type with the results of the binary operation. */ bitwiseAnd(rhs: bigint, memoryResource?: MemoryResource): Int64Series; bitwiseAnd(rhs: number, memoryResource?: MemoryResource): Float64Series; bitwiseAnd>(rhs: R, memoryResource?: MemoryResource): Series>; bitwiseAnd>(rhs: R, memoryResource?: MemoryResource): Series>; /** * Perform a binary `|` operation between this Series and another Series or scalar value. * * @param rhs The other Series or scalar to use. * @returns A Series of a common numeric type with the results of the binary operation. */ bitwiseOr(rhs: bigint, memoryResource?: MemoryResource): Int64Series; bitwiseOr(rhs: number, memoryResource?: MemoryResource): Float64Series; bitwiseOr>(rhs: R, memoryResource?: MemoryResource): Series>; bitwiseOr>(rhs: R, memoryResource?: MemoryResource): Series>; /** * Perform a binary `^` operation between this Series and another Series or scalar value. * * @param rhs The other Series or scalar to use. * @returns A Series of a common numeric type with the results of the binary operation. */ bitwiseXor(rhs: bigint, memoryResource?: MemoryResource): Int64Series; bitwiseXor(rhs: number, memoryResource?: MemoryResource): Float64Series; bitwiseXor>(rhs: R, memoryResource?: MemoryResource): Series>; bitwiseXor>(rhs: R, memoryResource?: MemoryResource): Series>; /** * Perform a binary `<<` operation between this Series and another Series or scalar value. * * @param rhs The other Series or scalar to use. * @returns A Series of a common numeric type with the results of the binary operation. */ shiftLeft(rhs: bigint, memoryResource?: MemoryResource): Int64Series; shiftLeft(rhs: number, memoryResource?: MemoryResource): Float64Series; shiftLeft>(rhs: R, memoryResource?: MemoryResource): Series>; shiftLeft>(rhs: R, memoryResource?: MemoryResource): Series>; /** * Perform a binary `>>` operation between this Series and another Series or scalar * value. * * @param rhs The other Series or scalar to use. * @returns A Series of a common numeric type with the results of the binary operation. */ shiftRight(rhs: bigint, memoryResource?: MemoryResource): Int64Series; shiftRight(rhs: number, memoryResource?: MemoryResource): Float64Series; shiftRight>(rhs: R, memoryResource?: MemoryResource): Series>; shiftRight>(rhs: R, memoryResource?: MemoryResource): Series>; /** * Perform a binary `shiftRightUnsigned` operation between this Series and another Series or * scalar value. * * @param rhs The other Series or scalar to use. * @returns A Series of a common numeric type with the results of the binary operation. */ shiftRightUnsigned(rhs: bigint, memoryResource?: MemoryResource): Int64Series; shiftRightUnsigned(rhs: number, memoryResource?: MemoryResource): Float64Series; shiftRightUnsigned>(rhs: R, memoryResource?: MemoryResource): Series>; shiftRightUnsigned>(rhs: R, memoryResource?: MemoryResource): Series>; /** * Compute the bitwise not (~) for each value in this Series. * * @param memoryResource Memory resource used to allocate the result Series's device memory. * @returns A Series of the same number of elements containing the result of the operation. */ bitInvert(memoryResource?: MemoryResource): Series; /** * Compute the cumulative max of all values in this Series. * * @param skipNulls The optional skipNulls if true drops NA and null values before computing * reduction, * else if skipNulls is false, reduction is computed directly. * @param memoryResource The optional MemoryResource used to allocate the result Series's device * memory. * @returns The cumulative max of all the values in this Series. * @example * ```typescript * import {Series} from '@rapidsai/cudf'; * const a = Series.new([4, 2, 5, 1, 1]).cast(new Int32) * * a.cumulativeMax() // {4, 4, 5, 5, 5} * ``` */ cumulativeMax(skipNulls?: boolean, memoryResource?: MemoryResource): Series; /** * Compute the cumulative min of all values in this Series. * * @param skipNulls The optional skipNulls if true drops NA and null values before computing * reduction, * else if skipNulls is false, reduction is computed directly. * @param memoryResource The optional MemoryResource used to allocate the result Series's device * memory. * @returns The cumulative min of all the values in this Series. * @example * ```typescript * import {Series} from '@rapidsai/cudf'; * const a = Series.new([4, 2, 5, 1, 1]).cast(new Int32) * * a.cumulativeMin() // {4, 2, 2, 1, 1} * ``` */ cumulativeMin(skipNulls?: boolean, memoryResource?: MemoryResource): Series; /** * Compute the cumulative product of all values in this Series. * * @param skipNulls The optional skipNulls if true drops NA and null values before computing * reduction, * else if skipNulls is false, reduction is computed directly. * @param memoryResource The optional MemoryResource used to allocate the result Series's device * memory. * @returns The cumulative product of all the values in this Series. * @example * ```typescript * import {Series} from '@rapidsai/cudf'; * const a = Series.new([4, 2, 5, 1, 1]).cast(new Int32) * * a.cumulativeProduct() // {4, 8, 40, 40, 40} * ``` */ cumulativeProduct(skipNulls?: boolean, memoryResource?: MemoryResource): Series; /** * Compute the cumulative sum of all values in this Series. * * @param skipNulls The optional skipNulls if true drops NA and null values before computing * reduction, * else if skipNulls is false, reduction is computed directly. * @param memoryResource The optional MemoryResource used to allocate the result Series's device * memory. * @returns The cumulative sum of all the values in this Series. * @example * ```typescript * import {Series} from '@rapidsai/cudf'; * const a = Series.new([4, 2, 5, 1, 1]).cast(new Int32) * * a.cumulativeSum() // {4, 6, 11, 12, 13} * ``` */ cumulativeSum(skipNulls?: boolean, memoryResource?: MemoryResource): Series; /** @inheritdoc */ sum(skipNulls?: boolean, memoryResource?: MemoryResource): bigint; /** @inheritdoc */ product(skipNulls?: boolean, memoryResource?: MemoryResource): bigint; /** @inheritdoc */ sumOfSquares(skipNulls?: boolean, memoryResource?: MemoryResource): bigint; } /** * A Series of 8-bit signed integer values in GPU memory. */ export declare class Int8Series extends IntSeries { /** * A Int8 view of the values in GPU memory. */ get data(): Int8Buffer; /** @inheritdoc */ min(skipNulls?: boolean, memoryResource?: MemoryResource): number; /** @inheritdoc */ max(skipNulls?: boolean, memoryResource?: MemoryResource): number; /** @inheritdoc */ minmax(skipNulls?: boolean, memoryResource?: MemoryResource): [number, number]; } /** * A Series of 16-bit signed integer values in GPU memory. */ export declare class Int16Series extends IntSeries { /** * A Int16 view of the values in GPU memory. */ get data(): Int16Buffer; /** @inheritdoc */ min(skipNulls?: boolean, memoryResource?: MemoryResource): number; /** @inheritdoc */ max(skipNulls?: boolean, memoryResource?: MemoryResource): number; /** @inheritdoc */ minmax(skipNulls?: boolean, memoryResource?: MemoryResource): [number, number]; } /** * A Series of 32-bit signed integer values in GPU memory. */ export declare class Int32Series extends IntSeries { /** * A Int32 view of the values in GPU memory. */ get data(): Int32Buffer; /** @inheritdoc */ min(skipNulls?: boolean, memoryResource?: MemoryResource): number; /** @inheritdoc */ max(skipNulls?: boolean, memoryResource?: MemoryResource): number; /** @inheritdoc */ minmax(skipNulls?: boolean, memoryResource?: MemoryResource): [number, number]; } /** * A Series of 64-bit signed integer values in GPU memory. */ export declare class Int64Series extends IntSeries { [Symbol.iterator](): Generator; /** * A Int64 view of the values in GPU memory. */ get data(): Int64Buffer; /** * Converts integers into IPv4 addresses as strings. * * The IPv4 format is 1-3 character digits [0-9] between 3 dots (e.g. 123.45.67.890). Each section * can have a value between [0-255]. * * Each input integer is dissected into four integers by dividing the input into 8-bit sections. * These sub-integers are then converted into [0-9] characters and placed between '.' characters. * * No checking is done on the input integer value. Only the lower 32-bits are used. * * Any null entries will result in corresponding null entries in the output series. * * @param memoryResource The optional MemoryResource used to allocate the result Series' device * memory. */ toIpv4String(memoryResource?: MemoryResource): Series; /** @inheritdoc */ min(skipNulls?: boolean, memoryResource?: MemoryResource): bigint; /** @inheritdoc */ max(skipNulls?: boolean, memoryResource?: MemoryResource): bigint; /** @inheritdoc */ minmax(skipNulls?: boolean, memoryResource?: MemoryResource): [bigint, bigint]; } /** * A Series of 8-bit unsigned integer values in GPU memory. */ export declare class Uint8Series extends IntSeries { /** * A Uint8 view of the values in GPU memory. */ get data(): Uint8Buffer; /** @inheritdoc */ min(skipNulls?: boolean, memoryResource?: MemoryResource): number; /** @inheritdoc */ max(skipNulls?: boolean, memoryResource?: MemoryResource): number; /** @inheritdoc */ minmax(skipNulls?: boolean, memoryResource?: MemoryResource): [number, number]; } /** * A Series of 16-bit unsigned integer values in GPU memory. */ export declare class Uint16Series extends IntSeries { /** * A Uint16 view of the values in GPU memory. */ get data(): Uint16Buffer; /** @inheritdoc */ min(skipNulls?: boolean, memoryResource?: MemoryResource): number; /** @inheritdoc */ max(skipNulls?: boolean, memoryResource?: MemoryResource): number; /** @inheritdoc */ minmax(skipNulls?: boolean, memoryResource?: MemoryResource): [number, number]; } /** * A Series of 32-bit unsigned integer values in GPU memory. */ export declare class Uint32Series extends IntSeries { /** * A Uint32 view of the values in GPU memory. */ get data(): Uint32Buffer; /** @inheritdoc */ min(skipNulls?: boolean, memoryResource?: MemoryResource): number; /** @inheritdoc */ max(skipNulls?: boolean, memoryResource?: MemoryResource): number; /** @inheritdoc */ minmax(skipNulls?: boolean, memoryResource?: MemoryResource): [number, number]; } /** * A Series of 64-bit unsigned integer values in GPU memory. */ export declare class Uint64Series extends IntSeries { [Symbol.iterator](): Generator; /** * A Uint64 view of the values in GPU memory. */ get data(): Uint64Buffer; /** @inheritdoc */ min(skipNulls?: boolean, memoryResource?: MemoryResource): bigint; /** @inheritdoc */ max(skipNulls?: boolean, memoryResource?: MemoryResource): bigint; /** @inheritdoc */ minmax(skipNulls?: boolean, memoryResource?: MemoryResource): [bigint, bigint]; } export {}; //# sourceMappingURL=integral.d.ts.map