Skip to content

Commit

Permalink
Bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
saschatimme committed May 9, 2018
1 parent ef7e9fb commit 69dcb3b
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/system.jl
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,19 @@ end
function System(polys::Vector{<:MP.AbstractPolynomialLike}, variables=_variables(polys))
System([Polynomial(p, variables) for p in polys])
end
_variables(polys) = sort!(union(Iterators.flatten(MP.variables.(ps))), rev=true)
_variables(polys) = sort!(union(Iterators.flatten(MP.variables.(polys))), rev=true)

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


"""
nvariables(F::System)
Returns the number of variables of `F`.
"""
nvariables(F::System) = size(exponents(F[1]), 1)

"""
JacobianConfig(F::Vector{Polynomial{T}}, [x::AbstractVector{S}])
Expand Down

0 comments on commit 69dcb3b

Please sign in to comment.