Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
ISC_122 - Travail Pratique 001 - Code de 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
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
florian.burgener
ISC_122 - Travail Pratique 001 - Code de Reed-Solomon
Commits
077fa6fa
Commit
077fa6fa
authored
3 years ago
by
gawen.ackerman
Browse files
Options
Downloads
Patches
Plain Diff
99234723
parent
fafe370e
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
polynomial.py
+2
-3
2 additions, 3 deletions
polynomial.py
with
2 additions
and
3 deletions
polynomial.py
+
2
−
3
View file @
077fa6fa
...
...
@@ -11,8 +11,7 @@ def unicode_superscripts(number):
Returns:
str: The unicode superscripts string.
"""
exponent_dict
=
{
"
0
"
:
"
⁰
"
,
"
1
"
:
"
¹
"
,
"
2
"
:
"
²
"
,
"
3
"
:
"
³
"
,
"
4
"
:
"
⁴
"
,
"
5
"
:
"
⁵
"
,
"
6
"
:
"
⁶
"
,
"
7
"
:
"
⁷
"
,
"
8
"
:
"
⁸
"
,
"
9
"
:
"
⁹
"
}
exponent_dict
=
{
"
0
"
:
"
⁰
"
,
"
1
"
:
"
¹
"
,
"
2
"
:
"
²
"
,
"
3
"
:
"
³
"
,
"
4
"
:
"
⁴
"
,
"
5
"
:
"
⁵
"
,
"
6
"
:
"
⁶
"
,
"
7
"
:
"
⁷
"
,
"
8
"
:
"
⁸
"
,
"
9
"
:
"
⁹
"
}
return
(
"
⁻
"
if
number
<
0
else
""
)
+
""
.
join
(
exponent_dict
[
x
]
for
x
in
str
(
abs
(
number
)))
...
...
@@ -220,7 +219,7 @@ def reed_solomon(points, data_length, last_error_index, prime_number):
# Parse each combination of points possible (exclude the correct points)
for
x
in
itertools
.
combinations
(
points
[:
last_error_index
+
1
],
combination_length
):
# Create a sublist of points with all corrects points and the current combination of points
sub_points
=
list
(
x
)
+
points
[
last_error_index
+
1
:]
sub_points
=
list
(
x
)
+
points
[
last_error_index
+
1
:]
# Create the lagrange polynomial with the sublist of points
lagrange
=
compute_lagrange_polynomial
(
sub_points
,
prime_number
)
...
...
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