Skip to content

Equality for Locset and Region#2517

Open
thorstenhater wants to merge 6 commits into
arbor-sim:masterfrom
thorstenhater:eq-on-morph-expr
Open

Equality for Locset and Region#2517
thorstenhater wants to merge 6 commits into
arbor-sim:masterfrom
thorstenhater:eq-on-morph-expr

Conversation

@thorstenhater

Copy link
Copy Markdown
Contributor

So far, to decide whether two region were equal, we had to rely on str(A) == str(B).
This is slow, inconvenient, and somewhat misleading.
Thus, this PR introduces equality on those types under the following definition:
Two regions/locsets are equally iff they share the same construction.

Example:

(tag 1) == (tag 1)
(tag 1) /= (region "soma") ;; even if "soma" is defined as (tag 1)

This is somewhat stricter than one might expect, but for a complete
definition, one would need to convert these expressions to their concrete
representations using the morphology and labels, which is not desirable
due to performance reasons. And could also end in surprise when
two unrelated expressions are equal given a very specific morphology.

@thorstenhater
thorstenhater marked this pull request as ready for review June 24, 2026 12:54
@thorstenhater
thorstenhater requested a review from ErbB4 June 24, 2026 13:01
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