Skip to content

Commit

Permalink
fix typos
Browse files Browse the repository at this point in the history
  • Loading branch information
jverzani committed Nov 7, 2023
1 parent 4aa92c1 commit d270863
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion docs/src/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -841,7 +841,7 @@ savefig("rational_function.svg"); nothing # hide

* [MultiPoly.jl](https://github.com/daviddelaat/MultiPoly.jl) for sparse multivariate polynomials

* [DynamicPolynomals.jl](https://github.com/JuliaAlgebra/DynamicPolynomials.jl) Multivariate polynomials implementation of commutative and non-commutative variables
* [DynamicPolynomials.jl](https://github.com/JuliaAlgebra/DynamicPolynomials.jl) Multivariate polynomials implementation of commutative and non-commutative variables

* [MultivariatePolynomials.jl](https://github.com/JuliaAlgebra/MultivariatePolynomials.jl) for multivariate polynomials and moments of commutative or non-commutative variables

Expand Down
2 changes: 1 addition & 1 deletion src/abstract-polynomial.jl
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ basis_symbol(::Type{AbstractUnivariatePolynomial{B,T,X}}) where {B,T,X} = "Χ($(

## idea is vector space stuff (scalar_add, scalar_mult, vector +/-, ^) goes here
## connection (convert, transform) is specific to a basis (storage)
## ⊗(p::P{T,X}, q::P{S,Y}) is specic to basis/storage
## ⊗(p::P{T,X}, q::P{S,Y}) is specific to basis/storage

# type of basis
basistype(p::AbstractUnivariatePolynomial{B,T,X}) where {B,T,X} = B
Expand Down
6 changes: 3 additions & 3 deletions src/common.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1005,7 +1005,7 @@ basis(p::P, k::Int, _var=indeterminate(p); var=_var) where {P<:AbstractPolynomia

#=
composition
cf. https://github.com/JuliaMath/Polynomials.jl/issues/511 for a paper with implentations
cf. https://github.com/JuliaMath/Polynomials.jl/issues/511 for a paper with implementations
=#
"""
Expand Down Expand Up @@ -1062,7 +1062,7 @@ Base.:+(p::P, c::T) where {T,X, P<:AbstractPolynomial{T,X}} = scalar_add(c, p)
Base.:+(p::P, c::S) where {T,X, P<:AbstractPolynomial{T,X}, S} = scalar_add(c,p)

## polynomial + polynomial when different types
## - each polynomial container type implents PB{B,T,X} + PB{B,S,X}
## - each polynomial container type implements PB{B,T,X} + PB{B,S,X}
## - this handles case X ≠ Y unless constant
## - when PB₁ ≠ PB₂ we promote both polynomials
function Base.:+(p::P, q::Q) where {T,X,P <: AbstractPolynomial{T,X}, S,Y,Q <: AbstractPolynomial{S,Y}}
Expand Down Expand Up @@ -1126,7 +1126,7 @@ Base.:^(p::AbstractPolynomial, n::Integer) = Base.power_by_squaring(p, n)



# Th ⊕ methd below is used in Special Polynomials, but not here, as it was removed for
# Th ⊕ method below is used in Special Polynomials, but not here, as it was removed for
# similar methods in the polynomial-basetypes
# addition of polynomials is just vector space addition, so can be done regardless
# of basis, as long as the same. These ⊕ methods try to find a performant means to add
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ ImmutableDensePolynomial{B,T,X,N}(check::Type{Val{false}}, cs::NTuple{N,T}) wher
ImmutableDensePolynomial{B,T,X,N}(check::Type{Val{true}}, cs::NTuple{N,T}) where {B,N, T,X} =
ImmutableDensePolynomial{B,T,X,N}(cs)

# tuple with mis-matched size
# tuple with mismatched size
function ImmutableDensePolynomial{B,T,X,N}(xs::NTuple{M,S}) where {B,T,S,X,N,M}
p = ImmutableDensePolynomial{B,S,X,M}(xs)
convert(ImmutableDensePolynomial{B,T,X,N}, ImmutableDensePolynomial{B,T,X,M}(xs))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
This polynomial type essentially uses an offset vector (`Vector{T}`,`order`) to store the coefficients of a polynomial relative to the basis `B` with indeterminate `X`.
The typical offset is to have `0` as the order, but, say, to accomodate Laurent polynomials, or more efficient storage of basis elements any order may be specified.
The typical offset is to have `0` as the order, but, say, to accommodate Laurent polynomials, or more efficient storage of basis elements any order may be specified.
This type trims trailing zeros and the leading zeros on construction.
Expand Down
2 changes: 1 addition & 1 deletion src/polynomials/standard-basis/immutable-polynomial.jl
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ end

# julia> @time Base.power_by_squaring(p,15);
# 0.000145 seconds (7 allocations: 6.547 KiB)
# This is not inferrable, as `n` is not a compile time constant
# This is not inferable, as `n` is not a compile time constant
Base.:^(p::ImmutablePolynomial, n::Integer) = immutable_power(p, n)
function immutable_power(p::ImmutablePolynomial{T,X,N}, n::Integer) where {T,X,N}
iszero(p) && return p
Expand Down
8 changes: 4 additions & 4 deletions src/polynomials/standard-basis/standard-basis.jl
Original file line number Diff line number Diff line change
Expand Up @@ -312,13 +312,13 @@ function _gcd_noda_sasaki(a::Vector{T}, b::Vector{S};
tol = atol + rtol

# determine the degree of GCD as the nullity of the Sylvester matrix
# this computation can be replaced by simply setting nd = 1, in which case the Sylvester matrix is not formed
# this computation can be replaced by simply setting nᵣ = 1, in which case the Sylvester matrix is not formed

nd = na1 + nb1 - 2 - rank([NGCD.convmtx(a1,nb1-1) NGCD.convmtx(b1,na1-1)], atol = tol) # julia 1.1
nd == 0 && (return [one(R)])
nᵣ = na1 + nb1 - 2 - rank([NGCD.convmtx(a1,nb1-1) NGCD.convmtx(b1,na1-1)], atol = tol) # julia 1.1
nᵣ == 0 && (return [one(R)])

sc = one(R)
while na1 > nd
while na1 > nᵣ
na1 < nb1 && ((a1, b1, na1, nb1) = (b1, a1, nb1, na1))
@inbounds for i in na1:-1:nb1
s = -a1[i] / b1[nb1]
Expand Down

0 comments on commit d270863

Please sign in to comment.