Mapytex/test/trop_de_tests.rst

17 lines
589 B
ReStructuredText
Raw Normal View History

2015-06-21 14:07:56 +00:00
Faire tous les cas de figures
=============================
Tester toutes les multiplications possibles
-------------------------------------------
.. code-block:: python
>>> from itertools import permutations
>>> coefs_p = [[(i-2),(j-2)] for i,j in permutations(range(5),2)]
>>> coefs_q = [[2*(i-2),2*(j-2)] for i,j in permutations(range(5),2)]
>>> l_p = [Polynom(i) for i in coefs_p]
>>> l_q = [Polynom(i) for i in coefs_q]
>>> operations = [Expression([l_p[i],l_q[j],op.mul]) for i,j in permutations(range(len(coefs_p)),2)]
>>> for i in operations:
... print(i)