MHRN-Space / src /core /__init__.py
ThomasHeisig's picture
Sync GitHub main 4645f4137666463023fa501984a14336dd2fc666 (part 11)
31226fd verified
Raw History Blame Contribute Delete
3.01 kB
"""MHRN core neural network components.
This package provides the fundamental building blocks of the MHRN
spiking neural network, including:
- 5D spatial indexing and coordinate transformations
- Izhikevich neuron model with multiple types, homeostasis, and energy
- Synaptic connections with STDP, reward-modulated plasticity, and metaplasticity
- Sparse spiking neural network with event-driven spike propagation
All components are fully typed and support serialization.
"""
from __future__ import annotations
from .network import (
Brain5DConfig,
NetworkConfig,
NeuralNetwork,
PostStepHook,
SimulationConfig,
SpikeEvent,
StepResult,
TopologyConfig,
create_network,
)
from .neuron import (
Neuron,
NeuronConfig,
NeuronType,
create_neuron,
create_random_neuron,
)
from .spatial_index import (
BITS_PER_DIM,
DIM_INDICES,
DIM_NAMES,
MASK,
MAX_COORD,
SHIFTS,
Coord5D,
Dim5D,
chebyshev_distance_5d,
coords_to_linear,
coords_to_linear_batch,
distance_5d,
euclidean_distance_5d,
get_dimension_index,
get_dimension_name,
is_valid_coord,
is_valid_coord_in_dims,
iter_linear_neighbours,
iter_neighbour_coords,
linear_to_5d,
linear_to_coord,
linear_to_coords_batch,
make_boundary_coord,
manhattan_distance_5d,
neighbour_count,
neighbour_offsets,
pack_coords,
total_cells,
unpack_coords,
validate_coord,
validate_coord_in_dims,
validate_dims,
weighted_distance_5d,
)
from .synapse import (
A_MINUS,
A_PLUS,
ELIGIBILITY_DECAY,
TAU_MINUS,
TAU_PLUS,
W_MAX,
W_MIN,
Synapse,
SynapseConfig,
create_random_synapse,
create_synapse,
)
__all__ = [
"BITS_PER_DIM",
"Coord5D",
"DIM_INDICES",
"DIM_NAMES",
"Dim5D",
"MASK",
"MAX_COORD",
"SHIFTS",
"chebyshev_distance_5d",
"coords_to_linear",
"coords_to_linear_batch",
"distance_5d",
"euclidean_distance_5d",
"get_dimension_index",
"get_dimension_name",
"is_valid_coord",
"is_valid_coord_in_dims",
"iter_linear_neighbours",
"iter_neighbour_coords",
"linear_to_5d",
"linear_to_coord",
"linear_to_coords_batch",
"make_boundary_coord",
"manhattan_distance_5d",
"neighbour_count",
"neighbour_offsets",
"pack_coords",
"total_cells",
"unpack_coords",
"validate_coord",
"validate_coord_in_dims",
"validate_dims",
"weighted_distance_5d",
"Neuron",
"NeuronConfig",
"NeuronType",
"create_neuron",
"create_random_neuron",
"A_MINUS",
"A_PLUS",
"ELIGIBILITY_DECAY",
"TAU_MINUS",
"TAU_PLUS",
"W_MAX",
"W_MIN",
"Synapse",
"SynapseConfig",
"create_random_synapse",
"create_synapse",
"Brain5DConfig",
"NetworkConfig",
"NeuralNetwork",
"PostStepHook",
"SimulationConfig",
"SpikeEvent",
"StepResult",
"TopologyConfig",
"create_network",
]