saealib.Stage#
- class saealib.Stage(*, name='', label='', notation='')[ソース]#
ベースクラス:
ABCAbstract base class for a compatibility execution step.
A Stage receives an
OptimizationState, performs one well-defined operation, and returns a (possibly new) state. Structured graph execution does not accept this boundary.- パラメータ:
name (str)
label (str)
notation (str)
- name#
Short machine-readable identifier used for lookup via
pipeline["name"].- Type:
str
- label#
Human-readable description of what this stage does.
- Type:
str
- notation#
LaTeX math expression used by
to_pseudocode().- Type:
str
Methods
Initialize base Stage attributes. |
|
Return this stage's structural and direct state-access contract. |
|
Execute this stage and return the updated state. |
|
Render this stage as a LaTeX algorithmic line. |
|
Render this stage as a plain-text algorithmic line. |
Method Details
- Stage.__init__(*, name='', label='', notation='')[ソース]#
Initialize base Stage attributes.
- パラメータ:
name (str, optional) -- Override the class-level
name.label (str, optional) -- Override the class-level
label.notation (str, optional) -- Override the class-level
notation.
- 戻り値の型:
None
- abstractmethod Stage.execute(state)[ソース]#
Execute this stage and return the updated state.
- パラメータ:
state (OptimizationState) -- Current optimization state.
- 戻り値:
Updated state.
- 戻り値の型:
OptimizationState
- Stage.to_pseudocode(*, expand=False, indent=0)[ソース]#
Render this stage as a LaTeX algorithmic line.
- パラメータ:
expand (bool) -- If True and this stage has sub-stages, recursively expand them.
indent (int) -- Current indentation level (number of
\Stateindent steps).
- 戻り値:
LaTeX algorithmic fragment.
- 戻り値の型:
str