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
fcdf70e8
Commit
fcdf70e8
authored
3 years ago
by
jonas.stirnema
Browse files
Options
Downloads
Plain Diff
Merge branch '16-create-function-reed_decode' into 'main'
Resolve "Create function reed_decode" Closes
#16
See merge request
!15
parents
84a0ab8d
f80f6c6a
No related branches found
Branches containing commit
No related tags found
1 merge request
!15
Resolve "Create function reed_decode"
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
reed_solomon.py
+7
-0
7 additions, 0 deletions
reed_solomon.py
with
7 additions
and
0 deletions
reed_solomon.py
+
7
−
0
View file @
fcdf70e8
...
...
@@ -43,3 +43,10 @@ def check_nb_error(l: list, p: polynome) -> int:
print
(
f
"
DEBUG PURPOSES ONLY
{
item
}
!= p.evaluate(
{
_
}
) =
{
p
.
evaluate
(
_
)
}
"
)
nbr_error
+=
1
return
nbr_error
def
reed_decode
(
l
:
list
)
->
polynome
:
for
points
in
get_possibilities
(
l
):
if
(
check_nb_error
(
l
,
lagrange_compute
(
points
))
<=
9
):
# Possibilité d'optimiser en evitant de compute 2 fois le poly
return
lagrange_compute
(
points
)
\ 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