Hecke.jl icon indicating copy to clipboard operation
Hecke.jl copied to clipboard

IndexCalculus

Open BD-00 opened this issue 2 years ago • 10 comments

IndexCalculus for DLP over safeprime fields. Wiedemann version for more general fields in progress

BD-00 avatar May 19 '22 15:05 BD-00

Nice, thanks.

It would be great if those @label/@goto would be rewritten. It seems they can just be replaced by simple while loops or if clauses.

thofma avatar May 20 '22 10:05 thofma

On Fri, May 20, 2022 at 04:36:22AM -0700, Berenike Dieterle wrote:

@BD-00 commented on this pull request.

  • add_scaled_row!(A[i], A[j], c)
  • A.nnz = A.nnz + length(A[j])
  • return A +end

@.*** Markdown.doc"""

  • add_scaled_col!(A::SMat{T}, i::Int, j::Int, c::T) -> SMat{T}

+As add_scaled_row!(A::SMat{T}, i::Int, j::Int, c::T) but with columns of $A$. +""" +function add_scaled_col!(A::SMat{T}, i::Int, j::Int, c::T) where T

  • @assert c != 0
  • @assert 1 <= i <= ncols(A) && 1 <= j <= ncols(A)
  • for r in A.rows
  • if i in r.pos
  •  i_i = findfirst(isequal(i), r.pos) #changed
    

Since the assignment to i_i happens within the if-part, this shouldn't be called if i not in r.pos, right? Correct, sorry In this case we just jump to the next row

-- Reply to this email directly or view it on GitHub: https://github.com/thofma/Hecke.jl/pull/701#discussion_r878052111 You are receiving this because you commented.

Message ID: @.***>

fieker avatar May 20 '22 11:05 fieker

Codecov Report

Merging #701 (94240b2) into master (e7143ef) will increase coverage by 1.83%. The diff coverage is 82.67%.

:exclamation: Current head 94240b2 differs from pull request most recent head 0fb4fbf. Consider uploading reports for the commit 0fb4fbf to get more accurate results

@@            Coverage Diff             @@
##           master     #701      +/-   ##
==========================================
+ Coverage   70.61%   72.44%   +1.83%     
==========================================
  Files         320      346      +26     
  Lines       93461    98385    +4924     
==========================================
+ Hits        65995    71275    +5280     
+ Misses      27466    27110     -356     
Impacted Files Coverage Δ
src/Sparse/Matrix.jl 58.95% <37.83%> (-2.70%) :arrow_down:
src/Sparse/Preprocessing.jl 64.17% <64.17%> (ø)
src/Sparse/DiscLog.jl 95.74% <95.74%> (ø)
src/Sparse/IndexCalculus.jl 96.23% <96.23%> (ø)
src/Sparse/Wiedemann.jl 96.55% <96.55%> (ø)
src/Misc/Series.jl 11.53% <0.00%> (-36.27%) :arrow_down:
src/ModAlgAss/ModAlgAss.jl 56.33% <0.00%> (-10.33%) :arrow_down:
src/NumFieldOrd/NfOrd/Unit/FindUnits.jl 77.77% <0.00%> (-9.73%) :arrow_down:
src/Grp/Morphisms.jl 77.77% <0.00%> (-7.51%) :arrow_down:
src/NumFieldOrd/NfOrd/Clgp.jl 76.23% <0.00%> (-5.83%) :arrow_down:
... and 152 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

codecov[bot] avatar May 20 '22 13:05 codecov[bot]

The tests fail with UndefVarError: disc_log not defined. Either export disc_log or use Hecke.disc_log in the test.

thofma avatar Jun 22 '22 11:06 thofma

The tests fail with UndefVarError: disc_log not defined. Either export disc_log or use Hecke.disc_log in the test.

export in src/Sparse.jl or the file where the function is defined? same with IdxCalc function?

BD-00 avatar Jun 22 '22 11:06 BD-00

I think it would be easier to use Hecke.disc_log and Hecke.IdxCalc in the tests.

thofma avatar Jun 22 '22 12:06 thofma

It seems that the file src/Sparse/DiscLog.jl is never included in Hecke, so the tests are failing.

The include calls should also be cleaned up. Files are included multiple times, which is not a thing in julia.

Also, the rule we follow is that any file in src/Sparse/*.jl should be included in src/Sparse.jl. This needs to be fixed.

thofma avatar Jun 30 '22 06:06 thofma

The real error is now here: https://github.com/thofma/Hecke.jl/runs/7443994926?check_suite_focus=true#step:6:629

thofma avatar Jul 21 '22 13:07 thofma

Tests are failing. Note that you can run the tests locally by doing Pkg.add("RandomExtensions") (needs to be done only once) and then Hecke.test_module("Sparse").

thofma avatar Aug 02 '22 14:08 thofma

Tests are failing. Note that you can run the tests locally by doing Pkg.add("RandomExtensions") (needs to be done only once) and then Hecke.test_module("Sparse").

They all pass locally. I forgot to add "Hecke." in front of some functions. This should now work.

BD-00 avatar Aug 03 '22 12:08 BD-00