API Reference

This section provides complete reference documentation for every public class, function, and exception in PyHDC.

Pages

pyhdc: Top-Level Module

Top-level module: version info, TORCH_AVAILABLE, convenience functions (generate, zeros, bundle, bind, unbind, similarity), and type aliases.

Hypervector

The Hypervector class: all properties and methods.

Encoding Base Class

The Encoding abstract base class, EncodingSpec dataclass, and BackendManager.

Encoding Classes

All 15 encoding classes: MAP_C, MAP_I, MAP_I_Bits, MAP_B, HRR, HRR_NoNorm, HRR_ConstNorm, FHRR, VTB, MBAT, BSC, BSDC_CDT, BSDC_S, BSDC_SEG, BSDC_THIN.

Data Encoders

The Encoder base and all data encoders: codebook (Empty, Identity, Random, Level, Thermometer, Circular) and functional (Projection, Sinusoid, Density, FractionalPower).

Generation Module

The HDCGenerator abstract base class, DefaultGenerator, and all seven generator families.

Components Module

All functions in pyhdc.components: binding, bundling, similarity, basis, quantization, elements, and thinning.

Exceptions

The HDCException hierarchy and when each exception is raised.

Type Aliases

Type aliases: Backend, ArrayLike, Device, GeneratorOutputType.