cottax.core.maths.valued module¶
A proved graph and a value at exactly each of its boundary inputs.
- check_every_input_given(g: GraphWithValues)[source]¶
- Return type:
Iterator[Violation]
- check_nothing_owned_given(g: GraphWithValues)[source]¶
- Return type:
Iterator[Violation]
- check_only_inputs_given(g: GraphWithValues)[source]¶
- Return type:
Iterator[Violation]
- class GraphWithValues[G: ProvedGraph, V: Place](graph: G, values: OrderedMap[V, Any])[source]¶
Bases:
Frozen,Generic[G,V]A proved graph and a value at exactly each of its boundary inputs. Its checks read the graph’s structure alone, so any proof holds; a consumer says which it takes.
- graph: G¶
- values: OrderedMap[V, Any]¶
- class InputMissing(places: tuple)[source]¶
Bases:
Violation- places: tuple¶
- template: AbstractClassVar[str] = 'no value given at {places!r}, which the graph reads and nothing in it computes'¶
e.g. ‘output {place!r} is owned by both {other!r} and {node!r}’
- Type:
Wording
- class OwnedGiven(places: tuple)[source]¶
Bases:
Violation- places: tuple¶
- template: AbstractClassVar[str] = 'a value given at {places!r}, which the graph computes: an owned place only ever means the value the run computes'¶
e.g. ‘output {place!r} is owned by both {other!r} and {node!r}’
- Type:
Wording