sagemath / sage

Main repository of SageMath
https://www.sagemath.org
Other
1.43k stars 479 forks source link

AG codes and decoders #27957

Closed kwankyu closed 3 years ago

kwankyu commented 5 years ago

We add AG codes and unique decoders for AG codes.

In Attachments below, there are Jupyter notebooks demonstrating the new features provided by this ticket. These were presented in 2019 SIAM Conference on Algebraic Geometry.


The author was supported by NRF of Korea 2018, 2019, 2020

Component: coding theory

Author: Kwankyu Lee

Branch/Commit: 7097dc7

Reviewer: Travis Scrimshaw

Issue created by migration from https://trac.sagemath.org/ticket/27957

kwankyu commented 3 years ago
comment:75

json is recommended. I have no experience with serializing objects in json. Is it practically doable with any Sage object?

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 3 years ago

Branch pushed to git repo; I updated commit sha1. New commits:

30d81a7Merge branch 'develop' into ag-codes-trac27957
e843edcFixes for some typos
7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 3 years ago

Changed commit from e333ffe to e843edc

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 3 years ago

Branch pushed to git repo; I updated commit sha1. New commits:

2b03e24Abandon using pickle jar for doctesting
7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 3 years ago

Changed commit from e843edc to 2b03e24

kwankyu commented 3 years ago
comment:78

As a few people expressed concerns using pickles for doctesting and there is no alternative practical way to store sage objects, I decided to abandon saved objects for speed up doctesting.

Now most doctests are tagged # long time except the class level examples.

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 3 years ago

Changed commit from 2b03e24 to 7097dc7

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 3 years ago

Branch pushed to git repo; I updated commit sha1. New commits:

7097dc7More refined "# long time" marked tests.
tscrim commented 3 years ago
comment:80

I feel it is better to mark any long test as long rather than separate out the class-level tests. This also led to a test that took 8s to run on my machine not marked as long. I also removed the long marked things that weren't needed for me as per --warn-long.

Something that we could consider doing is having a hidden @cached_function that just creates all of the necessary objects and returns them as a tuple. Since testing in Sage does not reset the session after each block, the result is cached as we only need to pay the penalty once when running the file. We would only use this in the hidden attributes; especially for the ones that have trivial output such as _latex_. Although perhaps there is a more trivial example that could be done for those?

kwankyu commented 3 years ago
comment:81

Replying to @tscrim:

I feel it is better to mark any long test as long rather than separate out the class-level tests. This also led to a test that took 8s to run on my machine not marked as long. I also removed the long marked things that weren't needed for me as per --warn-long.

Okay.

Something that we could consider doing is having a hidden @cached_function that just creates all of the necessary objects and returns them as a tuple. Since testing in Sage does not reset the session after each block, the result is cached as we only need to pay the penalty once when running the file. We would only use this in the hidden attributes; especially for the ones that have trivial output such as _latex_. Although perhaps there is a more trivial example that could be done for those?

This sounds not much different from what I did originally. Moreover I don't want to clutter the code only for testing things. I think we did enough for this ticket regarding doctesting.

tscrim commented 3 years ago
comment:82

Replying to @kwankyu:

Replying to @tscrim:

Something that we could consider doing is having a hidden @cached_function that just creates all of the necessary objects and returns them as a tuple. Since testing in Sage does not reset the session after each block, the result is cached as we only need to pay the penalty once when running the file. We would only use this in the hidden attributes; especially for the ones that have trivial output such as _latex_. Although perhaps there is a more trivial example that could be done for those?

This sounds not much different from what I did originally. Moreover I don't want to clutter the code only for testing things. I think we did enough for this ticket regarding doctesting.

The difference would be that it is created as part of the Sage session that is easily modified. However, I agree that the current state is sufficient (despite lacking a good solution). So we can set this to a positive review once the patchbot comes back green.

kwankyu commented 3 years ago
comment:83

Replying to @tscrim:

The difference would be that it is created as part of the Sage session that is easily modified.

I now see your point. It is a clever idea.

However, I agree that the current state is sufficient (despite lacking a good solution).

I do too.

So we can set this to a positive review once the patchbot comes back green.

Okay. Thank you.

tscrim commented 3 years ago
comment:84

Replying to @kwankyu:

Replying to @tscrim:

The difference would be that it is created as part of the Sage session that is easily modified.

I now see your point. It is a clever idea.

However, I agree that the current state is sufficient (despite lacking a good solution).

I do too.

So we can set this to a positive review once the patchbot comes back green.

Okay. Thank you.

Green bot. I am guessing you don't want to switch, correct?

kwankyu commented 3 years ago
comment:85

Replying to @tscrim:

Replying to @kwankyu:

Replying to @tscrim:

The difference would be that it is created as part of the Sage session that is easily modified.

I now see your point. It is a clever idea.

However, I agree that the current state is sufficient (despite lacking a good solution).

I do too.

So we can set this to a positive review once the patchbot comes back green.

Okay. Thank you.

Green bot. I am guessing you don't want to switch, correct?

Correct. No.

vbraun commented 3 years ago

Changed branch from public/coding/ag-codes-27957 to 7097dc7