diff --git a/src/Caching/bandedblockbanded.jl b/src/Caching/bandedblockbanded.jl index 7b574e3f..8d776ea7 100644 --- a/src/Caching/bandedblockbanded.jl +++ b/src/Caching/bandedblockbanded.jl @@ -14,7 +14,7 @@ end # function resizedata!(B::CachedOperator{T,<:BandedBlockBandedMatrix{T}}, ::Colon, col::Integer) where {T<:Number} if col > size(B,2) - throw(ArgumentError("Cannot resize beyound size of operator")) + throw(ArgumentError("Cannot resize beyond size of operator")) end if col > B.datasize[2] diff --git a/src/Caching/blockbanded.jl b/src/Caching/blockbanded.jl index ff554ecd..1797ff28 100644 --- a/src/Caching/blockbanded.jl +++ b/src/Caching/blockbanded.jl @@ -18,7 +18,7 @@ end # that is, trace an operator down the diagonal. What blocks correspond to the # block diagonal? # this is used to determine how many blocks to pad in the QR decomposition, as -# every lower block gets added to the upper daigonal +# every lower block gets added to the upper diagonal diagblockshift(a,b) = error("Developer: Not implemented for blocklengths $a, $b") @@ -88,7 +88,7 @@ end # function resizedata!(B::CachedOperator{T,BlockBandedMatrix{T}},::Colon,col::Integer) where {T<:Number} if col > size(B,2) - throw(ArgumentError("Cannot resize beyound size of operator")) + throw(ArgumentError("Cannot resize beyond size of operator")) end if col > B.datasize[2] diff --git a/src/Caching/matrix.jl b/src/Caching/matrix.jl index c94eef39..ecc4e37d 100644 --- a/src/Caching/matrix.jl +++ b/src/Caching/matrix.jl @@ -6,7 +6,7 @@ CachedOperator(::Type{Matrix},op::Operator;padding::Bool=false) = function resizedata!(B::CachedOperator{T,Matrix{T}},n::Integer,m::Integer) where T<:Number if n > size(B,1) || m > size(B,2) - throw(ArgumentError("Cannot resize beyound size of operator")) + throw(ArgumentError("Cannot resize beyond size of operator")) end # this does nothing if already in dimensions diff --git a/src/Caching/ragged.jl b/src/Caching/ragged.jl index 864dffbe..35992b60 100644 --- a/src/Caching/ragged.jl +++ b/src/Caching/ragged.jl @@ -13,7 +13,7 @@ function resizedata!(B::CachedOperator{T,RaggedMatrix{T}},::Colon,n::Integer) wh resize!(B.data.cols,n+1) if B.padding - # K is largest colstop. We get previous largest by looking at precalulated + # K is largest colstop. We get previous largest by looking at precalculated # cols K = B.datasize[2]==0 ? 0 : B.data.cols[B.datasize[2]+1]-B.data.cols[B.datasize[2]] diff --git a/src/Domain.jl b/src/Domain.jl index 94b98795..ebccc7d4 100644 --- a/src/Domain.jl +++ b/src/Domain.jl @@ -65,7 +65,7 @@ domainscompatible(a,b) = domainscompatible(domain(a),domain(b)) _isapprox(a, b) = isapprox(a,b) function _isapprox(a::Interval, b::Interval) # hacky compat for DomainSets v0.6, - # where comparing open and closed intevals throws an error + # where comparing open and closed intervals throws an error # However, we don't need to compare at all if the endpoints differ # this introduces a duplicate check, but that's probably ok isapprox(leftendpoint(a), leftendpoint(b), atol=100eps(prectype(a))) && @@ -90,7 +90,7 @@ function indomain(x,d::SegmentDomain) y=tocanonical(d,x) ry=real(y) iy=imag(y) - sc=norm(fromcanonicalD(d,ry<-1 ? -one(ry) : (ry>1 ? one(ry) : ry))) # scale based on stretch of map on projection to interal + sc=norm(fromcanonicalD(d,ry<-1 ? -one(ry) : (ry>1 ? one(ry) : ry))) # scale based on stretch of map on projection to interval dy=fromcanonical(d,y) # TODO: use isapprox once keywords are fast ((isinf(norm(dy)) && isinf(norm(x))) || norm(dy-x) ≤ 1000eps(T)*max(norm(x),1)) && @@ -101,7 +101,7 @@ end issubcomponent(a::Domain,b::Domain) = a in components(b) -##### canoncial +##### canonical """ tocanonical(d, x) @@ -120,7 +120,7 @@ function tocanonical end const 𝑪 = tocanonical -## conveninece routines +## convenience routines ones(d::Domain) = ones(prectype(d),Space(d)) zeros(d::Domain) = zeros(prectype(d),Space(d)) @@ -179,7 +179,7 @@ invfromcanonicalD(d::Domain,x...) = 1/fromcanonicalD(d,x...) ## sorting -# we sort spaces lexigraphically by default +# we sort spaces lexicographically by default for OP in (:<,:(<=),:(isless)) @eval $OP(a::Domain,b::Domain)=$OP(string(a),string(b)) diff --git a/src/Domains/Domains.jl b/src/Domains/Domains.jl index 671a2971..56e668ba 100644 --- a/src/Domains/Domains.jl +++ b/src/Domains/Domains.jl @@ -36,7 +36,7 @@ end -# multivariate domainxs +# multivariate domains include("multivariate.jl") diff --git a/src/Fun.jl b/src/Fun.jl index a6ac99c1..c0cf344b 100644 --- a/src/Fun.jl +++ b/src/Fun.jl @@ -777,7 +777,7 @@ iszero(f::Fun) = all(iszero, coefficients(f)) || all(iszero, values(f)) # Deliberately not named isconst or isconstant to avoid conflicts with Base or DomainSets isconstantfun(f::Fun) = iszero(f - first(f)) -# sum, integrate, and idfferentiate are in CalculusOperator +# sum, integrate, and differentiate are in CalculusOperator """ reverseorientation(f::Fun) @@ -826,11 +826,11 @@ end # exp.( [x,x]) is equivalent to [exp(x),exp(x)] # # does not throw the same error. When array values are mixed with arrays, the Array -# takes presidence: +# takes precedence: # # exp.([x;x] .+ [x,x]) is equivalent to exp.(Array([x;x]) .+ [x,x]) # -# This presidence is picked by the `promote_containertype` overrides. +# This precedence is picked by the `promote_containertype` overrides. struct FunStyle <: BroadcastStyle end diff --git a/src/LinearAlgebra/RaggedMatrix.jl b/src/LinearAlgebra/RaggedMatrix.jl index f5a05984..5f90698d 100644 --- a/src/LinearAlgebra/RaggedMatrix.jl +++ b/src/LinearAlgebra/RaggedMatrix.jl @@ -11,7 +11,7 @@ struct RaggedMatrix{T} <: AbstractMatrix{T} cols::Vector{Int} # a Vector specifying the first index of each column m::Int #Number of rows function RaggedMatrix{T}(data::Vector{T}, cols::Vector{Int}, m::Int) where T - # make sure the cols are monitonically increasing + # make sure the cols are monotonically increasing @assert 1==cols[1] for j=1:length(cols)-1 @assert cols[j] ≤ cols[j+1] diff --git a/src/LinearAlgebra/rowvector.jl b/src/LinearAlgebra/rowvector.jl index 3d244265..061162d6 100644 --- a/src/LinearAlgebra/rowvector.jl +++ b/src/LinearAlgebra/rowvector.jl @@ -64,7 +64,7 @@ to_vec(x) = x # expects to operate within the transposed domain, so to_vec transposes the elements @inline map(f, rowvecs::RowVector...) = RowVector(map(f, to_vecs(rowvecs...)...)) -# broacast (other combinations default to higher-dimensional array) +# broadcast (other combinations default to higher-dimensional array) @inline broadcast(f, rowvecs::Union{Number,RowVector}...) = RowVector(broadcast(f, to_vecs(rowvecs...)...)) diff --git a/src/Multivariate/ProductFun.jl b/src/Multivariate/ProductFun.jl index cbe948c3..17876257 100644 --- a/src/Multivariate/ProductFun.jl +++ b/src/Multivariate/ProductFun.jl @@ -306,7 +306,7 @@ function canonicalevaluate(f::ProductFun{S,V,SS,T},x::Number,::Colon) where {S,V end canonicalevaluate(f::ProductFun,x::Number,y::Number) = canonicalevaluate(f,x,:)(y) canonicalevaluate(f::ProductFun{S,V,SS},x::Colon,y::Number) where {S,V,SS<:TensorSpace} = - evaluate(transpose(f),y,:) # doesn't make sense For general product fon without specifying space + evaluate(transpose(f),y,:) # doesn't make sense For general product fun without specifying space canonicalevaluate(f::ProductFun,xx::AbstractVector,yy::AbstractVector) = transpose(hcat([evaluate(f,x,:)(yy) for x in xx]...)) diff --git a/src/Multivariate/TensorSpace.jl b/src/Multivariate/TensorSpace.jl index 815cf843..e2d11fba 100644 --- a/src/Multivariate/TensorSpace.jl +++ b/src/Multivariate/TensorSpace.jl @@ -15,7 +15,7 @@ factor(d::AbstractProductSpace,k) = factors(d)[k] ##### Tensorizer # This gives the map from coefficients to the # tensor entry of a tensor product of d spaces -# findfirst is overriden to get efficient inverse +# findfirst is overridden to get efficient inverse # blocklengths is a tuple of block lengths, e.g., Chebyshev()^2 # would be Tensorizer((Ones{Int}(∞), Ones{Int}(∞))) # ConstantSpace() ⊗ Chebyshev() @@ -43,7 +43,7 @@ Base.IteratorSize(::Type{Tensorizer{T}}) where {T<:Tuple} = _IteratorSize(T) Base.keys(a::Tensorizer) = oneto(length(a)) function start(a::TrivialTensorizer{d}) where {d} - # ((block_dim_1, block_dim_2,...), (itaration_number, iterator, iterator_state)), (itemssofar, length) + # ((block_dim_1, block_dim_2,...), (iteration_number, iterator, iterator_state)), (itemssofar, length) block = ntuple(one, d) return (block, (0, nothing, nothing)), (0,length(a)) end @@ -273,7 +273,7 @@ tensorblocklengths(a,b,c,d...) = tensorblocklengths(tensorblocklengths(a,b),c,d. TensorSpace(a::Space,b::Space) represents a tensor product of two 1D spaces `a` and `b`. -The coefficients are interlaced in lexigraphical order. +The coefficients are interlaced in lexicographical order. For example, consider ```julia diff --git a/src/Operators/Operator.jl b/src/Operators/Operator.jl index 20d2c045..2354a7fe 100644 --- a/src/Operators/Operator.jl +++ b/src/Operators/Operator.jl @@ -831,7 +831,7 @@ const WrapperOperator = Union{SpaceOperator,MultiplicationWrapper,DerivativeWrap # The following support converting an Operator to a Matrix or BandedMatrix ## BLAS and matrix routines -# We assume that copy may be overriden +# We assume that copy may be overridden function axpy!(a, X::Operator, Y::AbstractMatrix) Y .+= a .* AbstractMatrix(X) diff --git a/src/Operators/SubOperator.jl b/src/Operators/SubOperator.jl index 196ccbd1..8aea75d0 100644 --- a/src/Operators/SubOperator.jl +++ b/src/Operators/SubOperator.jl @@ -226,7 +226,7 @@ blockcolstop(S::SubOperator{<:Any,<:Any,Tuple{AbstractRange{Int},AbstractRange{I israggedbelow(S::SubOperator) = israggedbelow(parent(S)) -# since blocks don't change with indexex, neither do blockbandwidths +# since blocks don't change with indices, neither do blockbandwidths blockbandwidths(S::SubOperator{<:Any,<:Any,NTuple{2,AbstractRange{Int}}}) = blockbandwidths(parent(S)) function blockbandwidths(S::SubOperator{<:Any,<:Any,NTuple{2,BlockRange1}}) diff --git a/src/Operators/almostbanded/LowRankOperator.jl b/src/Operators/almostbanded/LowRankOperator.jl index 6f580f8c..06c7ad99 100644 --- a/src/Operators/almostbanded/LowRankOperator.jl +++ b/src/Operators/almostbanded/LowRankOperator.jl @@ -72,7 +72,7 @@ rank(L::LowRankOperator) = length(L.U) *(A::LowRankOperator,B::LowRankOperator) = LowRankOperator(transpose(A.V*B.transpose(U))*A.U,B.V) -# avoid ambiguituy +# avoid ambiguity for TYP in (:TimesOperator,:PlusOperator,:Conversion,:Operator) @eval *(L::LowRankOperator,B::$TYP) = LowRankOperator(L.U,map(v->v*B,L.V)) @eval *(B::$TYP,L::LowRankOperator) = LowRankOperator(map(u->B*u,L.U),L.V) diff --git a/src/Operators/banded/CalculusOperator.jl b/src/Operators/banded/CalculusOperator.jl index bb00ad6b..38f6bd69 100644 --- a/src/Operators/banded/CalculusOperator.jl +++ b/src/Operators/banded/CalculusOperator.jl @@ -370,7 +370,7 @@ Spaces will be inferred when applying or manipulating the operator. Integral(k::Int) """ - Intergral() + Integral() Return the first integral operator on an unset space. Spaces will be inferred when applying or manipulating the operator. diff --git a/src/Operators/banded/Multiplication.jl b/src/Operators/banded/Multiplication.jl index c1d13c01..36f5d604 100644 --- a/src/Operators/banded/Multiplication.jl +++ b/src/Operators/banded/Multiplication.jl @@ -148,7 +148,7 @@ function default_mult_compatible(f::Fun, g::Fun) coefficienttimes(g,f) end end -# This should be overriden whenever the multiplication space is different +# This should be overridden whenever the multiplication space is different function default_mult(f::Fun,g::Fun) # When the spaces differ we promote and multiply if domainscompatible(space(f),space(g)) diff --git a/src/Operators/banded/TridiagonalOperator.jl b/src/Operators/banded/TridiagonalOperator.jl index 6d4d01e9..af7ee1a5 100644 --- a/src/Operators/banded/TridiagonalOperator.jl +++ b/src/Operators/banded/TridiagonalOperator.jl @@ -1,5 +1,5 @@ ## This makes implementing operators simpler -# but overrided BandedMatrix directly is likely to be faster +# but overriding BandedMatrix directly is likely to be faster abstract type TridiagonalOperator{T} <: Operator{T} end diff --git a/src/Operators/banded/banded.jl b/src/Operators/banded/banded.jl index dbef9a3d..711ecdcb 100644 --- a/src/Operators/banded/banded.jl +++ b/src/Operators/banded/banded.jl @@ -3,7 +3,7 @@ include("ConstantOperator.jl") include("TridiagonalOperator.jl") include("PermutationOperator.jl") -## Operators overrided for spaces +## Operators overridden for spaces include("Conversion.jl") include("Multiplication.jl") diff --git a/src/Operators/functionals/Evaluation.jl b/src/Operators/functionals/Evaluation.jl index 9eba4961..9365c87f 100644 --- a/src/Operators/functionals/Evaluation.jl +++ b/src/Operators/functionals/Evaluation.jl @@ -250,7 +250,7 @@ DirichletWrapper(B::Operator,λ=0) = DirichletWrapper{typeof(B),eltype(B)}(B,λ) convert(::Type{Operator{T}},B::DirichletWrapper) where {T} = DirichletWrapper(Operator{T}(B.op),B.order)::Operator{T} -# Default is to use diffbca +# Default is to use diffbcs default_Dirichlet(sp::Space,λ) = DirichletWrapper(InterlaceOperator((ldiffbc(sp,λ), rdiffbc(sp,λ)), false), λ) Dirichlet(sp::Space,λ) = default_Dirichlet(sp,λ) diff --git a/src/Operators/general/InterlaceOperator.jl b/src/Operators/general/InterlaceOperator.jl index 2c2eca07..add6c514 100644 --- a/src/Operators/general/InterlaceOperator.jl +++ b/src/Operators/general/InterlaceOperator.jl @@ -534,7 +534,7 @@ Operator(M::AbstractArray{<:Operator}) = InterlaceOperator(M) function interlace_choosedomainspace(ops,sp::UnsetSpace) - # this ensures correct dispatch for unino + # this ensures correct dispatch for union sps = Vector{Space}( filter(x->!isambiguous(x),map(choosedomainspace,ops))) if isempty(sps) @@ -546,7 +546,7 @@ end function interlace_choosedomainspace(ops,rs::Space) - # this ensures correct dispatch for unino + # this ensures correct dispatch for union sps = Vector{Space}( filter(x->!isambiguous(x),map((op)->choosedomainspace(op,rs),ops))) if isempty(sps) diff --git a/src/Operators/general/PartialInverseOperator.jl b/src/Operators/general/PartialInverseOperator.jl index 53057723..c522e363 100644 --- a/src/Operators/general/PartialInverseOperator.jl +++ b/src/Operators/general/PartialInverseOperator.jl @@ -70,7 +70,7 @@ rangespace(P::PartialInverseOperator)=domainspace(P.cache) domain(P::PartialInverseOperator)=domain(domainspace(P)) bandwidths(P::PartialInverseOperator) = P.bandwidths -# Compute the value at the (k,j)th index of inv(C), assumming that C is upper triangular +# Compute the value at the (k,j)th index of inv(C), assuming that C is upper triangular function _getindexinv(C, k::Integer, j::Integer, ::Type{UpperTriangular}) j >= k || return zero(inv(one(eltype(C)))) j == k && return inv(C[k,k]) diff --git a/src/Operators/general/algebra.jl b/src/Operators/general/algebra.jl index 4229c74b..258d14c2 100644 --- a/src/Operators/general/algebra.jl +++ b/src/Operators/general/algebra.jl @@ -741,7 +741,7 @@ function choosedomainspace(P::PlusOperator, sp::Space) ret = UnsetSpace() for op in P.ops sp2 = choosedomainspace(op, sp) - if !isa(sp2, AmbiguousSpace) # we will ignore this result in hopes another opand + if !isa(sp2, AmbiguousSpace) # we will ignore this result in hopes another operand # tells us a good space ret = union(ret, sp2) end diff --git a/src/Operators/systems.jl b/src/Operators/systems.jl index 914b1f25..832d2a96 100644 --- a/src/Operators/systems.jl +++ b/src/Operators/systems.jl @@ -56,7 +56,7 @@ end blockdiag(a::Operator,b::Operator) = blockdiag(Operator{promote_type(eltype(a),eltype(b))}[a], Operator{promote_type(eltype(a),eltype(b))}[b]) -## broadcase +## broadcast broadcast(::typeof(*),A::AbstractArray{N},D::Operator) where {N<:Number} = Operator{promote_type(N,eltype(D))}[A[k,j]*D for k=1:size(A,1),j=1:size(A,2)] diff --git a/src/PDE/KroneckerOperator.jl b/src/PDE/KroneckerOperator.jl index c4871198..24b4917d 100644 --- a/src/PDE/KroneckerOperator.jl +++ b/src/PDE/KroneckerOperator.jl @@ -151,7 +151,7 @@ function subblockbandwidths(K::KroneckerOperator) sb = subblock_blockbandwidths(K) # divide by the size of each block sb_sz = mapreduce(getindex_value,*,dt.blocks) - # spread by sub block szie + # spread by sub block size (sb[1]+1)*sb_sz-1,(sb[2]+1)*sb_sz-1 end end @@ -182,7 +182,7 @@ domaintensorizer(K::KroneckerOperator) = K.domaintensorizer rangetensorizer(K::KroneckerOperator) = K.rangetensorizer -# we suport 4-indexing with KroneckerOperator +# we support 4-indexing with KroneckerOperator # If A is K x J and B is N x M, then w # index to match KO=reshape(kron(B,A),N,K,M,J) # that is @@ -388,7 +388,7 @@ convert(::Type{BandedBlockBandedMatrix}, S::SubOperator{T,KroneckerOperator{SS,V ## Conversion -# TODO: we explicetly state type to avoid type inference bug in 0.4 +# TODO: we explicitly state type to avoid type inference bug in 0.4 ConcreteConversion(a::BivariateSpace,b::BivariateSpace) = ConcreteConversion(promote_type(prectype(a),prectype(b)), a,b) diff --git a/src/Space.jl b/src/Space.jl index e1e7e5af..d077a137 100644 --- a/src/Space.jl +++ b/src/Space.jl @@ -92,7 +92,7 @@ end # S=typeof(sp) # @assert length(fieldnames(S))==1 # # the domain is not compatible, but maybe we c -# # can drop the space depence. For example, +# # can drop the space dependence. For example, # # CosSpace{Circle{Float64}} -> CosSpace # eval(Meta.parse(string(S.name.module)*"."*string(S.name)))(d) # end @@ -218,7 +218,7 @@ function conversion_type(a, b) if spacescompatible(a,b) a elseif !domainscompatible(a,b) - NoSpace() # this avoids having to check eachtime + NoSpace() # this avoids having to check each time else cr=conversion_rule(a,b) cr==NoSpace() ? conversion_rule(b,a) : cr @@ -246,7 +246,7 @@ function maxspace(a::Space, b::Space) if spacescompatible(a,b) return a elseif !domainscompatible(a,b) - return NoSpace() # this avoids having to check eachtime + return NoSpace() # this avoids having to check each time end @@ -600,7 +600,7 @@ for OP in (:plan_transform,:plan_itransform,:plan_transform!,:plan_itransform!) end ## sorting -# we sort spaces lexigraphically by default +# we sort spaces lexicographically by default for OP in (:<,:(<=),:(isless)) @eval $OP(a::Space,b::Space)=$OP(string(a),string(b)) diff --git a/src/Spaces/ArraySpace.jl b/src/Spaces/ArraySpace.jl index e3c60041..d507fb79 100644 --- a/src/Spaces/ArraySpace.jl +++ b/src/Spaces/ArraySpace.jl @@ -17,7 +17,7 @@ end const VectorSpace{S,DD,RR,A<:AbstractVector{S}} = ArraySpace{S,1,DD,RR,A} const MatrixSpace{S,DD,RR,A<:AbstractMatrix{S}} = ArraySpace{S,2,DD,RR,A} -#TODO: Think through domain/domaindominsion +#TODO: Think through domain/domaindimension ArraySpace(sp::AbstractArray{SS,N}) where {D,R,SS<:Space{D,R},N} = ArraySpace{SS,N,D,R,typeof(sp)}(sp) ArraySpace(sp::AbstractArray{SS,N}, f = first(sp)) where {SS<:Space,N} = diff --git a/src/Spaces/ConstantSpace.jl b/src/Spaces/ConstantSpace.jl index 32b60968..100b22a0 100644 --- a/src/Spaces/ConstantSpace.jl +++ b/src/Spaces/ConstantSpace.jl @@ -1,4 +1,4 @@ -## Sequence space defintions +## Sequence space definitions # A Fun for SequenceSpace can be an iterator iterate(::Fun{SequenceSpace}) = 1 @@ -29,7 +29,7 @@ coefficients(cfs::AbstractVector,::SequenceSpace) = cfs # all vectors are conve -## Constant space defintions +## Constant space definitions containsconstant(A::Space) = containsconstant(typeof(A)) containsconstant(@nospecialize(_)) = Val(false) @@ -266,7 +266,7 @@ promoterangespace(M::ConcreteMultiplication{CS,UnsetSpace}, ps::Space) where {CS<:ConstantSpace} = promoterangespace(Multiplication(M.f,space(M.f)),ps) -# Possible hack: we try uing constant space for [1 Operator()] \ z. +# Possible hack: we try using constant space for [1 Operator()] \ z. choosedomainspace(M::ConcreteMultiplication{D,UnsetSpace},sp::UnsetSpace) where {D<:ConstantSpace} = space(M.f) choosedomainspace(M::ConcreteMultiplication{D,UnsetSpace},sp::Space) where {D<:ConstantSpace} = space(M.f) diff --git a/src/Spaces/HeavisideSpace.jl b/src/Spaces/HeavisideSpace.jl index 29fa4a16..068fc93b 100644 --- a/src/Spaces/HeavisideSpace.jl +++ b/src/Spaces/HeavisideSpace.jl @@ -88,7 +88,7 @@ function Base.sum(f::Fun{SplineSpace{1,T,R}}) where {T,R} ret end -#diffentiate HeavisideSpace +#differentiate HeavisideSpace function differentiate(f::Fun{<:HeavisideSpace}) dp=domain(f).points cfs=f.coefficients diff --git a/src/Spaces/ProductSpaceOperators.jl b/src/Spaces/ProductSpaceOperators.jl index dc32e106..4226a01b 100644 --- a/src/Spaces/ProductSpaceOperators.jl +++ b/src/Spaces/ProductSpaceOperators.jl @@ -286,7 +286,7 @@ end choosedomainspace(M::CalculusOperator{UnsetSpace}, sp::SumSpace) = mapreduce(s->choosedomainspace(M,s),union,sp.spaces) -## Multiplcation for Array*Vector +## Multiplication for Array*Vector function Multiplication(f::Fun{<:MatrixSpace}, sp::VectorSpace) @assert size(space(f),2)==length(sp) @@ -324,7 +324,7 @@ end Multiplication(f::Fun, sp::PiecewiseSpace) = MultiplicationWrapper(f, Multiplication(Fun(f,sp),sp)) -# we override coefficienttimes to split the multiplication down to components as union may combine spaes +# we override coefficienttimes to split the multiplication down to components as union may combine spaces coefficienttimes(f::Fun{S1},g::Fun{S2}) where {S1<:SumSpace,S2<:SumSpace} = mapreduce(ff->ff*g,+,components(f)) coefficienttimes(f::Fun{S1},g::Fun) where {S1<:SumSpace} = mapreduce(ff->ff*g,+,components(f)) diff --git a/src/Spaces/Spaces.jl b/src/Spaces/Spaces.jl index 932aec0f..955ac7b1 100644 --- a/src/Spaces/Spaces.jl +++ b/src/Spaces/Spaces.jl @@ -192,7 +192,7 @@ function evaluate(f::AbstractVector,S::WeightSpace,x...) weight(S,x...).*fv end -# recurrence is inhereted +# recurrence is inherited for FUNC in (:recα,:recβ,:recγ) @eval $FUNC(T,ws::WeightSpace,k) = $FUNC(T,ws.space,k) end diff --git a/src/Spaces/SubSpace.jl b/src/Spaces/SubSpace.jl index e963d8b0..3343aead 100644 --- a/src/Spaces/SubSpace.jl +++ b/src/Spaces/SubSpace.jl @@ -28,7 +28,7 @@ function blocklengths(sp::SubSpace{DS,UnitRange{Int}}) where DS M = last(sp.indexes) B1 = block(sp.space,N) B2 = block(sp.space,M) - # if the blocks are equal, we have only one bvlock + # if the blocks are equal, we have only one block B1 == B2 && return [Zeros{Int}(Int(B1)-1); length(sp.indexes)] [Zeros{Int}(Int(B1)-1); @@ -126,7 +126,7 @@ end # return the space that has banded Conversion to the other function conversion_rule(a::SubSpace,b::Space) if a.space==b - a # we can write droping coefficients as a banded operator + a # we can write dropping coefficients as a banded operator else NoSpace() end @@ -142,7 +142,7 @@ end # return the space that has banded Conversion to the other function union_rule(a::SubSpace,b::Space) if a.space==b - b # we can write droping coefficients as a banded operator + b # we can write dropping coefficients as a banded operator else NoSpace() end diff --git a/src/Spaces/SumSpace.jl b/src/Spaces/SumSpace.jl index 37fe1c81..08bdbb98 100644 --- a/src/Spaces/SumSpace.jl +++ b/src/Spaces/SumSpace.jl @@ -209,7 +209,7 @@ end ## components -# We use a view when it's avaiable to avoid allocation +# We use a view when it's available to avoid allocation component_coefficients(it::TrivialInterlacer{d},cfs,k) where {d} = (@view cfs[k:d:end]) function component_coefficients(it,cfs,k) diff --git a/src/eigen.jl b/src/eigen.jl index b101207d..09b0e38f 100644 --- a/src/eigen.jl +++ b/src/eigen.jl @@ -109,7 +109,7 @@ inner product given the boundary conditions `B`. The optional argument `QuotientSpaceType` specifies the type of space to be used to denote the quotient space in the basis recombination process. In most cases, the default choice of `QuotientSpace` is a good one. In specific instances where `B` is rank-deficient (e.g. it contains a column of zeros, -which typically happens if one of the basis elements already satiafies the boundary conditions), +which typically happens if one of the basis elements already satisfies the boundary conditions), one may need to choose this to be a `PathologicalQuotientSpace`. !!! note @@ -130,7 +130,7 @@ inner product given the boundary conditions `B`. The optional argument `QuotientSpaceType` specifies the type of space to be used to denote the quotient space in the basis recombination process. In most cases, the default choice of `QuotientSpace` is a good one. In specific instances where `B` is rank-deficient (e.g. it contains a column of zeros, -which typically happens if one of the basis elements already satiafies the boundary conditions), +which typically happens if one of the basis elements already satisfies the boundary conditions), one may need to choose this to be a `PathologicalQuotientSpace`. !!! note diff --git a/src/specialfunctions.jl b/src/specialfunctions.jl index c9904393..9e72799e 100644 --- a/src/specialfunctions.jl +++ b/src/specialfunctions.jl @@ -152,7 +152,7 @@ function _specialfunctionnormalizationpoint(op,growth,f) end # this is used to find a point in which to impose a boundary -# condition in calculating secial functions +# condition in calculating special functions function specialfunctionnormalizationpoint(op,growth,f) xmin, xmax, opfxmin, opfxmax, opmax = _specialfunctionnormalizationpoint(op,growth,f) if abs(opfxmin) == opmax