Skip to content

Commit

Permalink
fix #715 (construction sresolution) (#719)
Browse files Browse the repository at this point in the history
  • Loading branch information
hannes14 authored Oct 25, 2023
1 parent 8f97bdc commit 2510aa2
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion deps/src/singular.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ JLCXX_MODULE define_julia_module(jlcxx::Module & Singular)
result->list_length = static_cast<short>(len);
result->length = static_cast<int>(len);
resolvente res_cp = (resolvente)omAlloc0((len + 1) * sizeof(ideal));
for (int i = 0; i <= len; i++)
for (int i = 0; i < len; i++)
{
if (res[i] != NULL)
{
Expand Down
2 changes: 1 addition & 1 deletion src/resolution/resolution.jl
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ and that their pairwise composition is the zero map, that is, that the
created resolution is a complex.
"""
function Resolution(C::Vector{smodule{T}}) where T <: AbstractAlgebra.RingElem
len = size(C, 1)+1
len = size(C, 1)
len > 1 || error("no module specified")
R = base_ring(C[1])
CC = (m -> m.ptr).(C)
Expand Down
8 changes: 8 additions & 0 deletions test/resolution/sresolution-test.jl
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,14 @@
@test F isa AbstractAlgebra.SetElem

@test isa(F, sresolution)
R, ( x, y) = polynomial_ring(QQ, ["x", "y"])
v1 = vector(R, x )
v2 = vector(R, y)
M1 = Singular.Module(R, v1, v2)
v3 = vector(R, -y, x)
M2 = Singular.Module(R, v3)
F=Resolution([M1,M2])
@test isa(F, sresolution)
end

@testset "sresolution.manipulation" begin
Expand Down

0 comments on commit 2510aa2

Please sign in to comment.