Skip to content

Commit 69dcb3b

Browse files
committed
Bugfix
1 parent ef7e9fb commit 69dcb3b

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/system.jl

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,19 @@ end
1414
function System(polys::Vector{<:MP.AbstractPolynomialLike}, variables=_variables(polys))
1515
System([Polynomial(p, variables) for p in polys])
1616
end
17-
_variables(polys) = sort!(union(Iterators.flatten(MP.variables.(ps))), rev=true)
17+
_variables(polys) = sort!(union(Iterators.flatten(MP.variables.(polys))), rev=true)
1818

1919
Base.length(F::System) = length(F.polys)
2020
Base.getindex(F::System, i) = getindex(F.polys, i)
2121

22+
23+
"""
24+
nvariables(F::System)
25+
26+
Returns the number of variables of `F`.
27+
"""
28+
nvariables(F::System) = size(exponents(F[1]), 1)
29+
2230
"""
2331
2432
JacobianConfig(F::Vector{Polynomial{T}}, [x::AbstractVector{S}])

0 commit comments

Comments
 (0)