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
dfb1fce5
Commit
dfb1fce5
authored
3 years ago
by
jonas.stirnema
Browse files
Options
Downloads
Patches
Plain Diff
test bébé lagrange, marche pas
parent
570821e7
No related branches found
No related tags found
1 merge request
!16
Draft: Resolve "test jonas"
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
reed_solomon.py
+14
-1
14 additions, 1 deletion
reed_solomon.py
with
14 additions
and
1 deletion
reed_solomon.py
+
14
−
1
View file @
dfb1fce5
...
...
@@ -21,8 +21,21 @@ def get_possibilities(l: list):
return
p
# l : List of tuple (x, y)
def
lagrange_compute
(
l
:
list
)
->
polynome
:
pass
# Produit de k = 0 > n
# bébé lagrange pour premier tuple choisit
from
inverse_mult
import
inverse_mult
x
=
l
[
0
][
0
]
coefs
=
[]
for
i
,
t
in
enumerate
(
l
):
if
(
x
!=
l
[
i
][
0
]):
print
(
f
""
)
print
(
f
"
{
t
[
0
]
*
x
}
/ inverse(
{
x
-
t
[
0
]
}
- 229)
"
)
coefs
.
append
(
t
[
0
]
*
inverse_mult
(
x
-
t
[
0
],
229
))
print
(
f
"
DEBUG
{
coefs
}
"
)
return
polynome
(
coefs
)
def
check_nb_error
(
l
:
list
,
p
:
polynome
)
->
int
:
...
...
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