Skip to content

feat: implement 2D and 3D taxicab (Manhattan) metrics#35

Open
divye-joshi wants to merge 1 commit intoINCF:masterfrom
divye-joshi:feat/taxicab-metric
Open

feat: implement 2D and 3D taxicab (Manhattan) metrics#35
divye-joshi wants to merge 1 commit intoINCF:masterfrom
divye-joshi:feat/taxicab-metric

Conversation

@divye-joshi
Copy link

Description

This PR implements the Taxicab (Manhattan) metric for 2D and 3D geometries. This is an essential distance metric ($L_1$ norm) often used in neural models where connectivity is constrained to grid-like paths or modular structures.

Changes Made

  • csa/geometry.py: Added taxicabDistance2d, taxicabMetric2d, taxicabDistance3d, and taxicabMetric3d.

Why this is essential

The library currently only supports Euclidean ($L_2$) metrics. Providing a Taxicab alternative allows users to define masks like disc(r) * d where $d$ is a Manhattan metric, which is a common requirement in computational neuroscience for rectilinear architectures.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Comments