CompositeByTypePolicy#
- class braincell.CompositeByTypePolicy(rules, default_policy)[source]#
Dispatch different CV policies by morphology branch type.
- Variables:
rules (tuple of CVPolicyByTypeRule) – Type-dispatch rules checked in order.
default_policy (CVPolicy) – Fallback policy used when no rule matches a branch.
- resolve_cv_bounds(morpho, *, paint_rules=None)[source]#
Return branch-wise bounds after type-based policy dispatch.
- Parameters:
morpho (
Morphology) – Morphology being discretized.paint_rules (
tuple[PaintRule,...] |None) – Paint declarations forwarded to sub-policies.
- Returns:
Branch-wise normalized intervals assembled from the selected sub-policy for each branch.
- Return type: