""" Common utilities and shared elements for the snow_spike package. """ from enum import Enum from typing import Dict, List, Optional, Union, Any # Define the SpikeState enum for representing neuron states SpikeState = Enum('SpikeState', { 'NEGATIVE': -1, 'NEUTRAL': 0, 'POSITIVE': 1 }) # Define the CrossCheckType enum for normalization CrossCheckType = Enum('CrossCheckType', [ 'COSINE_SIMILARITY', 'GENERAL_SCORE' ]) # Define the DecayStrategy enum for decay mechanisms DecayStrategy = Enum('DecayStrategy', [ 'CONTINUOUS_ON_READ', 'DISCRETE_BATCH', 'NO_DECAY' ]) # Type aliases for improved readability SpikeCounts = Dict[SpikeState, int] SpikeProbabilities = Dict[SpikeState, float] SpikeData = List[int] Timestamp = float