SEMQ TypeScript API
    Preparing search index...

    SEMQ TypeScript API

    SEMQ: deterministic symbolic encoding of float32 vectors, for browsers and Node, over the shared C core compiled to WebAssembly.

    Five types and one service, backed by a core that owns every rule:

    • CodecConfig: the rule (quant, phase or orbit).
    • Codec: encodes unit-norm float32 vectors into an Encoding.
    • Encoding: ids, canonical rows, a manifest and two identities; toBytes/fromBytes, concat and diff.
    • Diff: added, removed and changed ids with hamming distances.
    • Floor: the envelope of variation observed in null diffs of one reference, with asDict() and Floor.fromDict() for its report form.
    • BuildInfo from buildInfo.

    Errors: InvalidInput, Incompatible, FormatError, IntegrityError, Unsupported, Native. Out of memory is a RangeError.

    Loading the wasm module is the one asynchronous step. await Codec.create(config) performs it; so does load, for code that needs CodecConfig, Encoding.fromBytes or Floor before it has a Codec. Everything else is synchronous and raises Native when called before the runtime is loaded.

    Operator
    Codec
    CodecConfig
    Diff
    Encoding
    Floor
    FormatError
    Incompatible
    IntegrityError
    InvalidInput
    Native
    Unsupported
    BuildInfo
    GateOptions
    Verdict
    Reason
    buildInfo
    load