Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update to Singular_jll v403.214.1400 #748

Merged
merged 5 commits into from
Jan 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Pidfile = "1.3"
Pkg = "1.6"
Random = "1.6"
RandomExtensions = "0.4.2"
Singular_jll = "~403.212.1202"
Singular_jll = "~403.214.1400"
Statistics = "1.6"
julia = "1.6"
lib4ti2_jll = "1.6.10"
Expand Down
6 changes: 5 additions & 1 deletion deps/src/ideals.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -100,12 +100,16 @@ auto id_prune_map_helper(sip_sideal * I, ring R)
return std::make_tuple(s, TT);
}

auto id_prune_map_v_helper(sip_sideal * I, int* v, ring R)
auto id_prune_map_v_helper(sip_sideal * I, jlcxx::ArrayRef<int> a, ring R)
{
auto origin = currRing;
rChangeCurrRing(R);
ideal T;
int *v = (int *)omAlloc(I->rank*sizeof(int));
ideal s = idMinEmbedding_with_map_v(I, NULL, T, v);
for (int j = 0; j < I->rank; j++)
a.push_back(v[j]);
omFreeSize(v,I->rank*sizeof(int));
matrix TT = id_Module2Matrix(T, currRing);
rChangeCurrRing(origin);
return std::make_tuple(s, TT);
Expand Down
7 changes: 7 additions & 0 deletions deps/src/singular.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,13 @@ JLCXX_MODULE define_julia_module(jlcxx::Module & Singular)
Singular.set_const("n_Zp", n_Zp);
Singular.set_const("n_GF", n_GF);
Singular.set_const("n_transExt", n_transExt);
Singular.set_const("n_Nemo_AnticNumberField", n_Nemo_AnticNumberField);
Singular.set_const("n_Nemo_QQField", n_Nemo_QQField);
Singular.set_const("n_Nemo_ZZRing", n_Nemo_ZZRing);
Singular.set_const("n_Nemo_FqPolyRepField", n_Nemo_FqPolyRepField);
Singular.set_const("n_Nemo_fqPolyRepField", n_Nemo_fqPolyRepField);
Singular.set_const("n_Nemo_Field", n_Nemo_Field);
Singular.set_const("n_Nemo_Ring", n_Nemo_Ring);
Singular.set_const("n_unknown", n_unknown);
Singular.add_type<snumber>("number");
Singular.add_type<__mpz_struct>("__mpz_struct");
Expand Down
3 changes: 2 additions & 1 deletion src/module/module.jl
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,8 @@ and the transformation matrix of id to R.
"""
function prune_with_map(I::smodule{spoly{T}}) where T <: Nemo.FieldElem
R = base_ring(I)
r, TT_ptr = GC.@preserve I R libSingular.id_prune_map(I.ptr, R.ptr)
a = Vector{Int32}()
r, TT_ptr = GC.@preserve I R libSingular.id_prune_map_v(I.ptr, a, R.ptr)
return smodule{spoly{T}}(R, r),smatrix{spoly{T}}(R,TT_ptr)
end

Expand Down
Loading