@@ -4,7 +4,7 @@ export mindegree, maxdegree, extdegree
44export leadingterm, leadingcoefficient, leadingmonomial
55export removeleadingterm, removemonomials, monic
66
7- Compat . LinearAlgebra. norm (p:: AbstractPolynomialLike , r:: Int = 2 ) = norm (coefficients (p), r)
7+ LinearAlgebra. norm (p:: AbstractPolynomialLike , r:: Int = 2 ) = LinearAlgebra . norm (coefficients (p), r)
88
99changecoefficienttype (:: Type{TT} , :: Type{T} ) where {TT<: AbstractTermLike , T} = termtype (TT, T)
1010changecoefficienttype (:: Type{PT} , :: Type{T} ) where {PT<: AbstractPolynomial , T} = polynomialtype (PT, T)
@@ -54,7 +54,7 @@ polynomial(ts::AbstractVector{<:AbstractTerm}, s::SortedUniqState) = polynomial(
5454polynomial (a:: AbstractVector , x:: AbstractVector , s:: ListState = MessyState ()) = polynomial ([α * m for (α, m) in zip (a, x)], s)
5555polynomial (f:: Function , mv:: AbstractVector{<:AbstractMonomialLike} ) = polynomial ([f (i) * mv[i] for i in 1 : length (mv)])
5656function polynomial (Q:: AbstractMatrix , mv:: AbstractVector )
57- dot (mv, Q * mv)
57+ LinearAlgebra . dot (mv, Q * mv)
5858end
5959function polynomial (Q:: AbstractMatrix , mv:: AbstractVector , :: Type{T} ) where T
6060 polynomial (polynomial (Q, mv), T)
@@ -368,8 +368,10 @@ function mapcoefficientsnz(f::Function, p::AbstractPolynomialLike)
368368end
369369mapcoefficientsnz (f:: Function , t:: AbstractTermLike ) = f (coefficient (t)) * monomial (t)
370370
371- Base. round (t:: AbstractTermLike , args... ) = round (coefficient (t), args... ) * monomial (t)
372- function Base. round (p:: AbstractPolynomialLike , args... )
371+ Base. round (t:: AbstractTermLike ; args... ) = round (coefficient (t); args... ) * monomial (t)
372+ function Base. round (p:: AbstractPolynomialLike ; args... )
373373 # round(0.1) is zero so we cannot use SortedUniqState
374- polynomial (round .(terms (p), args... ), SortedState ())
374+ polynomial (round .(terms (p); args... ), SortedState ())
375375end
376+
377+ Base. broadcastable (p:: AbstractPolynomialLike ) = Ref (p)
0 commit comments