Skip to content

Commit 0a13a44

Browse files
committed
Add docstring
1 parent d28bab9 commit 0a13a44

File tree

4 files changed

+19
-9
lines changed

4 files changed

+19
-9
lines changed

docs/Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
33
MultivariatePolynomials = "102ac46a-7ee4-5c85-9060-abc95bfdeaa3"
44

55
[compat]
6-
Documenter = "^0.19.6"
6+
Documenter = "^0.24.3"

docs/make.jl

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,15 @@
11
using Documenter, MultivariatePolynomials
22

33
makedocs(
4-
format = :html,
54
sitename = "MultivariatePolynomials",
5+
6+
format = Documenter.HTML(
7+
# See https://github.com/JuliaDocs/Documenter.jl/issues/868
8+
prettyurls = get(ENV, "CI", nothing) == "true"
9+
),
10+
# See https://github.com/JuliaOpt/JuMP.jl/issues/1576
11+
strict = true,
12+
613
pages = [
714
"Introduction" => "index.md",
815
"Types" => "types.md",
@@ -14,9 +21,4 @@ makedocs(
1421

1522
deploydocs(
1623
repo = "github.com/JuliaAlgebra/MultivariatePolynomials.jl.git",
17-
target = "build",
18-
osname = "linux",
19-
julia = "1.0",
20-
deps = nothing,
21-
make = nothing,
2224
)

docs/src/types.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ AbstractMonomialLike
2323
AbstractMonomial
2424
monomialtype
2525
variables
26+
effective_variables
2627
nvariables
2728
exponents
2829
degree
@@ -56,7 +57,7 @@ polynomialtype
5657
terms
5758
nterms
5859
coefficients
59-
coefficient(p::AbstractPolynomialLike, vars, m::AbstractMonomialLike)
60+
coefficient(p::AbstractPolynomialLike, m::AbstractMonomialLike, vars)
6061
monomials
6162
mindegree
6263
maxdegree

src/polynomial.jl

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,14 @@ function extdegree(p::Union{AbstractPolynomialLike, AbstractVector{<:AbstractTer
258258
(mindegree(p, args...), maxdegree(p, args...))
259259
end
260260

261-
function effective_variables(p::AbstractPolynomialLike, args...)
261+
"""
262+
effective_variables(p::AbstractPolynomialLike)
263+
264+
Return a vector of `eltype` `variable_union_type(p)` (see [`variable_union_type`](@ref)),
265+
containing all the variables that has nonzero degree in at least one term.
266+
That is, return all the variables `v` such that `maxdegree(p, v)` is not zero.
267+
"""
268+
function effective_variables(p::AbstractPolynomialLike)
262269
VT = variable_union_type(p)
263270
return VT[v for v in variables(p) if !iszero(maxdegree(p, v))]
264271
end

0 commit comments

Comments
 (0)