SEMQ TypeScript API
    Preparing search index...

    Class CodecConfig

    An immutable value: operator, dimension and the operator's parameter. Build one with CodecConfig.quant, CodecConfig.phase or CodecConfig.orbit; the core validates every parameter and computes every derived quantity. Equality is equality of the 13 canonical bytes.

    Index
    • get maxMagnitude(): number

      quant only: (float)(2.0 / sqrt(dim)) as the core computes it, the binary32 value as a JavaScript number.

      Returns number

    • get ruleRevision(): number

      Operator rule revision (p2), 0 for this core.

      Returns number

    • { operator, dim, <bins | sectors | scale>, rule_revision } as in reports.

      Returns Record<string, string | number>

    • The 13-byte canonical form (a copy).

      Returns Uint8Array

    • orbit: digital-root symbol per coordinate; scale in [1, 2^30].

      Parameters

      • dim: number
      • scale: number = 50

      Returns CodecConfig

    • phase: angular sector per coordinate pair; sectors in [2, 256].

      Parameters

      • dim: number
      • sectors: number

      Returns CodecConfig

    • quant: sign and magnitude bin per coordinate; bins in [2, 64].

      Parameters

      • dim: number
      • bins: number

      Returns CodecConfig