pyecsca.ec.formula.fliparoo module¶
Provides a way to Fliparoo formulas.
- class Fliparoo(chain, graph)[source]¶
Bases:
object
- Fliparoo is a chain of nodes N1->N2->…->Nk in FormulaGraph for k>=2 such that:
All Ni are * or All Ni are +/-
For every Ni, except for Nk, the only outgoing node is Ni+1
Neither of N1,…,Nk-1 is an output node
-
nodes:
List
[CodeOpNode
]¶
-
graph:
FormulaGraph
¶
- property first¶
- property last¶
- class MulFliparoo(chain, graph)[source]¶
Bases:
Fliparoo
- deepcopy()¶
- property first¶
- property last¶
- previous(node)¶
- Return type:
Optional
[CodeOpNode
]
- slice(i, j)¶
- verify_chain(nodes)¶
-
nodes:
List
[CodeOpNode
]¶
-
graph:
FormulaGraph
¶
- class AddSubFliparoo(chain, graph)[source]¶
Bases:
Fliparoo
- deepcopy()¶
- property first¶
- property last¶
- previous(node)¶
- Return type:
Optional
[CodeOpNode
]
- slice(i, j)¶
- verify_chain(nodes)¶
-
nodes:
List
[CodeOpNode
]¶
-
graph:
FormulaGraph
¶
- class AddFliparoo(chain, graph)[source]¶
Bases:
Fliparoo
- deepcopy()¶
- property first¶
- property last¶
- previous(node)¶
- Return type:
Optional
[CodeOpNode
]
- slice(i, j)¶
- verify_chain(nodes)¶
-
nodes:
List
[CodeOpNode
]¶
-
graph:
FormulaGraph
¶
- exception BadFliparoo[source]¶
Bases:
Exception
- add_note()¶
Exception.add_note(note) – add a note to the exception
- args¶
- with_traceback()¶
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
- generate_fliparood_formulas(formula, rename=True)[source]¶
- Return type:
Iterator
[CodeFormula
]