Skip to content

Commit

Permalink
Merge pull request #182 from raulepure/matrices
Browse files Browse the repository at this point in the history
Minor bug fixes
  • Loading branch information
wbhart authored Dec 20, 2019
2 parents d180cd4 + 8ecb8a8 commit 686f426
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 3 deletions.
1 change: 1 addition & 0 deletions src/ideal/ideal.jl
Original file line number Diff line number Diff line change
Expand Up @@ -539,6 +539,7 @@ end

function Ideal(R::PolyRing{T}, ids::spoly{T}...) where T <: Nemo.RingElem
S = elem_type(R)
length(ids) == 0 && return sideal{S}(R, R(0))
return sideal{S}(R, ids...)
end

Expand Down
6 changes: 5 additions & 1 deletion src/matrix/matrix.jl
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,11 @@ function *(p::spoly{T}, M::smatrix{spoly{T}}) where T <: AbstractAlgebra.RingEle
x = libSingular.mp_Copy(M.ptr, R.ptr)
y = libSingular.p_Copy(p.ptr, R.ptr)
ptr = libSingular.mp_MultP(x, y, R.ptr)
return smatrix{T}(R, ptr)
return smatrix{spoly{T}}(R, ptr)
end

function *(M::smatrix{spoly{T}}, p::spoly{T}) where T <: AbstractAlgebra.RingElem
return p*M
end

function *(i::Int, M::smatrix{T}) where T <: AbstractAlgebra.RingElem
Expand Down
2 changes: 1 addition & 1 deletion src/poly/poly.jl
Original file line number Diff line number Diff line change
Expand Up @@ -907,7 +907,7 @@ function jacobian_matrix(p::spoly)
end

@doc Markdown.doc"""
jacobian_matrix(A::Array{spoly, 1})
jacobian_matrix(A::Vector{spoly, 1})
> Given an array $A$ of polynomials over the same base ring,
> this function returns the Jacobian matrix of $A$.
"""
Expand Down
2 changes: 1 addition & 1 deletion test/ideal/sideal-test.jl
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ end
I0 = Ideal(R)
I1 = Ideal(R, x, y)

@test ngens(I0) == 0
@test ngens(I0) == 1
@test ngens(I1) == 2
@test x in gens(I1) && y in gens(I1)

Expand Down

0 comments on commit 686f426

Please sign in to comment.