"""Shared type aliases used across the package."""

from __future__ import annotations

from typing import TypeAlias

import numpy as np

# Sparse random-indexing vector represented as index -> weight.
SparseVector: TypeAlias = dict[int, float]
# Ordered feature log used for explainability and debugging.
FeatureLog: TypeAlias = list[tuple[str, float]]
# Aggregated feature contribution map keyed by feature token.
FeatureMap: TypeAlias = dict[str, float]
# Dense vectors paired with scalar composition weights.
WeightedDenseVectors: TypeAlias = list[tuple[np.ndarray, float]]
