Skip to content
Snippets Groups Projects
Commit 66eb8c78 authored by nicolas.albanesi's avatar nicolas.albanesi
Browse files

Fonction get_possibilities à tester

parent 8c4e1d67
Branches
No related tags found
1 merge request!11Resolve "Create function get_possibilities"
# Created on 09/12/2021
from polynome import *
from itertools import combinations
def get_possibilities(l: list):
pass
# Transforme the list in list of tupples with their indexes
for x, _ in enumerate(l):
l[x] = (l[x], x)
# ! la valeur 20 est hardcodée. Paramètre de fonction ??
l_fixe = l[20:] # Liste contenant aucune erreur
l_posi = l[:20] # Liste contenant des erreurs,
p = list(combinations(l_posi, 2))
for x, y in enumerate(p):
p[x] = list(y)
p[x].extend(l_fixe)
return p
'''
[1, 2, 3, 4, 5]
[1, 2, 3, 4, 5, 6, 7, 8, 9]
| |
| err |
'''
def lagrange_compute(l: list) -> polynome:
pass
......@@ -10,3 +39,4 @@ def lagrange_compute(l: list) -> polynome:
def check_nb_error(l: list, p: polynome) -> int:
pass
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment