Skip to content

Commit bddf6e8

Browse files
committed
Move comments to prevent confusion Literate
1 parent e61b0c8 commit bddf6e8

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

docs/src/tutorials/Extension/univariate_solver.jl

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,7 @@ function decompose(p::MP.AbstractPolynomial, tol=1e-6)
5353
root = F.values[i]
5454
q *= (x - root)
5555
if !isapprox(real(root), real(F.values[i+1]), rtol=tol, atol=tol)
56-
# Cannot happen for complex conjugate root so it means that
57-
# we have a root which does not have an even multiplicity
58-
# This means that the polynomial is not nonnegative
59-
return
56+
return # Cannot happen for complex conjugate root so it means that we have a root which does not have an even multiplicity This means that the polynomial is not nonnegative
6057
end
6158
i += 2
6259
end
@@ -91,8 +88,7 @@ function MOI.add_constraint(optimizer::Optimizer, func::MOI.VectorAffineFunction
9188
error("Only supports constant polynomials")
9289
end
9390
optimizer.p = MP.polynomial(func.constants, set.monomials)
94-
# There will be only ever one constraint so the index does not matter.
95-
return MOI.ConstraintIndex{typeof(func),typeof(set)}(1)
91+
return MOI.ConstraintIndex{typeof(func),typeof(set)}(1) # There will be only ever one constraint so the index does not matter.
9692
end
9793

9894
function MOI.optimize!(optimizer::Optimizer)

0 commit comments

Comments
 (0)