Skip to content

Commit

Permalink
also check for equal orderings in map_ideal (#821)
Browse files Browse the repository at this point in the history
  • Loading branch information
hannes14 authored Aug 22, 2024
1 parent 3dac87e commit 3f601c9
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion src/map/alghom.jl
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,21 @@ function map_ideal(f::Map(SAlgHom), I::sideal)
f.ptr, f.codomain.ptr, libSingular.ndCopyMap())

J = Ideal(f.codomain,ptr)
J.isGB = I.isGB
# compare the orderings of f.domain.ptr and f.codomain.ptr
domain_ord=Cint[]
libSingular.rOrdering_helper(domain_ord, f.domain.ptr)
codomain_ord=Cint[]
libSingular.rOrdering_helper(codomain_ord, f.codomain.ptr)
equal_ordering=true
for i in 1:size(domain_ord,1)
if domain_ord[i] != codomain_ord[i]
equal_ordering=false
break
end
end
if equal_ordering
J.isGB = I.isGB
end
return J
end

Expand Down

0 comments on commit 3f601c9

Please sign in to comment.