cottax.core.maths.dispatch module

The one Answer for a whole graph: the one registered for its place class, or its label class.

check_places_answered(interface: type[Answer], graph: NestingGraph)[source]
Return type:

Iterator[Violation]

check_labels_answered(interface: type[Answer], graph: NestingGraph)[source]
Return type:

Iterator[Violation]

answer_for_places[A: Answer](interface: type[A], graph: NestingGraph)[source]

The interface answer registered for the class of graph’s places, asked of one: a graph is over one place class. Its refusals are violations(answer_for_places, …).

Return type:

A

answer_for_labels[A: Answer](interface: type[A], graph: NestingGraph)[source]

The interface answer registered for the class of graph’s node names, asked of one. Its refusals are violations(answer_for_labels, …).

Return type:

A

class NothingToAsk(interface: str, what: str)[source]

Bases: Violation

interface: str
what: str
template: AbstractClassVar[str] = 'a graph with no {what} has no class to find its {interface} by'

e.g. ‘output {place!r} is owned by both {other!r} and {node!r}’

Type:

Wording