cottax.consumers.declaration.declared module¶
A tree of models declared: walked in written order, planned with the values and tags written beside it (declare, Declared).
- class Declared[N: Label, V: Place](plan: Plan, given: OrderedMap[V, Any], place_tags: Tags[V] = {}, node_tags: Tags[N] = {})[source]¶
Bases:
Frozen,Generic[N,V]A plan, the values given at its boundary inputs, and the tags written on its places and on its node names. An op edits the plan alone: a value or a tag at a place the plan renames away is left where it was written, and a run takes no value nothing reads.
- given: OrderedMap[V, Any]¶
- property graph: NestingGraph[N, V]¶
- declare(*models: Any)[source]¶
Everything the models declare, each at the node name its position in the tree gives, as a plan, with the values and tags written beside it: declare(d1, d2, {‘opt’: opt}). A declaration held by another keeps only nodes_when_held, a held node nothing.
- Return type:
- loose_at[N](model: Declaration | NodeDefinition, names: DerivedNames[N, Any])[source]¶
The node name a model handed over loose takes, refused where it says none.
- Return type:
N