Skip to content

Commit b0e0c22

Browse files
committed
uses lower level interface to AbstractAlgebra multivariate polynomials over QQ
1 parent ceb5977 commit b0e0c22

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

src/interfaces/nemo.jl

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -157,21 +157,22 @@ function _convert_rational_array_to_abstract_algebra(
157157
if bcf[len+1] == 0
158158
push!(basis, R(0))
159159
else
160-
g = MPolyBuildCtx(R)
160+
g = zero(R)
161161
lc = bcf[len+1]
162162

163163
if normalize && lc != 1
164164
for j in 1:blen[i]
165-
push_term!(g, bcf[len+j]/lc,
166-
convert(Vector{Int}, bexp[(len+j-1)*nr_vars+1:(len+j)*nr_vars]))
165+
Nemo.setcoeff!(g, j, bcf[len+j]/lc)
167166
end
168167
else
169168
for j in 1:blen[i]
170-
push_term!(g, bcf[len+j],
171-
convert(Vector{Int}, bexp[(len+j-1)*nr_vars+1:(len+j)*nr_vars]))
169+
Nemo.setcoeff!(g, j, bcf[len+j])
172170
end
173171
end
174-
push!(basis, finish(g))
172+
for j in 1:blen[i]
173+
Nemo.set_exponent_vector!(g, j, convert(Vector{Int}, bexp[(len+j-1)*nr_vars+1:(len+j)*nr_vars]))
174+
end
175+
push!(basis, g)
175176
end
176177
len += blen[i]
177178
end

0 commit comments

Comments
 (0)