File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -301,8 +301,27 @@ function Base.iszero(p::AbstractPolynomial)
301
301
end
302
302
303
303
# See discussions in https://github.com/JuliaMath/Polynomials.jl/issues/258
304
+ """
305
+ all(pred, poly::AbstractPolynomial)
306
+
307
+ Test whether all coefficients of an `AbstractPolynomial` satisfy predicate `pred`.
308
+
309
+ You can implement `isreal`, etc., to a `Polynomial` by using `all`.
310
+ """
304
311
Base. all (pred, poly:: AbstractPolynomial ) = all (pred, poly[:])
312
+ """
313
+ any(pred, poly::AbstractPolynomial)
314
+
315
+ Test whether any coefficient of an `AbstractPolynomial` satisfies predicate `pred`.
316
+ """
305
317
Base. any (pred, poly:: AbstractPolynomial ) = any (pred, poly[:])
318
+ """
319
+ map(fn, p::AbstractPolynomial)
320
+
321
+ Transform coefficients of `p` by applying a function (or other callables) `fn` to each of them.
322
+
323
+ You can implement `real`, etc., to a `Polynomial` by using `map`.
324
+ """
306
325
Base. map (fn, p:: P ) where {P<: AbstractPolynomial } = ⟒ (P)(map (fn, coeffs (p)), p. var)
307
326
308
327
"""
You can’t perform that action at this time.
0 commit comments