Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
reed_solomon
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
darius.briquet
reed_solomon
Commits
66ed2099
Commit
66ed2099
authored
3 years ago
by
jonas.stirnema
Browse files
Options
Downloads
Plain Diff
Merge branch '11-create-function-get_possibilities' into 'main'
Resolve "Create function get_possibilities" Closes
#11
See merge request
!11
parents
4c45e872
c681bbb7
No related branches found
Branches containing commit
No related tags found
1 merge request
!11
Resolve "Create function get_possibilities"
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
reed_solomon.py
+19
-2
19 additions, 2 deletions
reed_solomon.py
with
19 additions
and
2 deletions
reed_solomon.py
+
19
−
2
View file @
66ed2099
# 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
]
=
(
x
,
l
[
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
def
lagrange_compute
(
l
:
list
)
->
polynome
:
pass
...
...
@@ -14,4 +31,4 @@ def check_nb_error(l: list, p: polynome) -> int:
if
(
item
%
p
.
prime_mod
)
!=
(
p
.
evaluate
(
_
)
%
p
.
prime_mod
):
print
(
f
"
{
item
}
!= p.evaluate(
{
_
}
) =
{
p
.
evaluate
(
_
)
}
"
)
nbr_error
+=
1
return
nbr_error
return
nbr_error
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment