bitwise-flag - v2.1.0
    Preparing search index...

    Interface Combinator<T>

    An abstract interface over a set of primitive bitwise operations for a given numeric type T.

    interface Combinator<T extends Bit> {
        zero: T;
        and(a: T, b: T): T;
        andNot(a: T, b: T): T;
        not(a: T): T;
        or(a: T, b: T): T;
        popcount(a: T): number;
        shiftL(value: T, shift: number): T;
        xor(a: T, b: T): T;
    }

    Type Parameters

    • T extends Bit

      The numeric type over which bitwise operations are performed. Must be either number or bigint (i.e. Bit).

    Implemented by

    Index

    Properties

    Methods

    Properties

    zero: T

    The identity element for or — a value with no bits set (0 or 0n).

    Methods