Skip to content

Commit

Permalink
Move imports to the main file (#655)
Browse files Browse the repository at this point in the history
  • Loading branch information
jishnub authored Jun 8, 2024
1 parent 49429cd commit 2842691
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 32 deletions.
11 changes: 8 additions & 3 deletions src/ApproxFunBase.jl
Original file line number Diff line number Diff line change
Expand Up @@ -47,16 +47,21 @@ import Base: values, convert, getindex, setindex!, *, +, -, ==, <, <=, >, |, !,
asec, cot, acot, sinh, csch, asinh, acsch,
sech, acosh, asech, tanh, coth, atanh, acoth,
sinc, cosc, log1p, log, expm1, tan,
max, min, cbrt, atan, acos, asin
max, min, cbrt, atan, acos, asin, chop,
axes, IndexStyle, IndexLinear, typed_hcat, parent

import Base.Broadcast: BroadcastStyle, Broadcasted, AbstractArrayStyle,
broadcastable, DefaultArrayStyle, broadcasted

import LinearAlgebra: BlasInt, BlasFloat, norm, ldiv!, mul!, det, cross,
import LinearAlgebra: BlasFloat, norm, ldiv!, mul!, det, cross,
qr, qr!, rank, isdiag, istril, istriu, issymmetric,
Tridiagonal, diagm, diagm_container, factorize,
nullspace, Hermitian, Symmetric, adjoint, transpose, char_uplo,
axpy!, eigvals
axpy!, eigvals, LU, checknonsingular, chkstride1

import LinearAlgebra.LAPACK.chklapackerror

import LinearAlgebra.BLAS: @blasfunc, libblas, liblapack, BlasInt

import SparseArrays: blockdiag

Expand Down
3 changes: 1 addition & 2 deletions src/Fun.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
export Fun, evaluate, values, points, extrapolate, setdomain
export coefficients, ncoefficients, coefficient
export integrate, differentiate, domain, space, linesum, linenorm
export bilinearform, linebilinearform, innerproduct, lineinnerproduct

include("Domain.jl")
include("Space.jl")
Expand Down Expand Up @@ -637,8 +638,6 @@ inv(f::Fun) = 1/f

# Integrals over two Funs, which are fast with the orthogonal weight.

export bilinearform, linebilinearform, innerproduct, lineinnerproduct

# Having fallbacks allow for the fast implementations.

defaultbilinearform(f::Fun,g::Fun)=sum(f*g)
Expand Down
2 changes: 0 additions & 2 deletions src/LinearAlgebra/blas.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import LinearAlgebra.BLAS: @blasfunc, libblas, liblapack

# Level 2
## mv
### gemv
Expand Down
2 changes: 0 additions & 2 deletions src/LinearAlgebra/helper.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import Base: chop

# BLAS/linear algebra overrides

@inline dot(x...) = LinearAlgebra.dot(x...)
Expand Down
6 changes: 0 additions & 6 deletions src/LinearAlgebra/hesseneigs.jl
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@



import LinearAlgebra.BLAS: BlasInt, @blasfunc


for (hseqr,elty) in ((:zhseqr_,:ComplexF64),)
@eval function hesseneigvals(M::Matrix{$elty})
if isempty(M)
Expand Down
4 changes: 0 additions & 4 deletions src/LinearAlgebra/rowvector.jl
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
# This file is based on rowvector.jl in Julia. License is MIT: https://julialang.org/license
# The motivation for this file is to allow RowVector which doesn't transpose the entries

import Base: convert, similar, length, size, axes, IndexStyle,
IndexLinear, @propagate_inbounds, getindex, setindex!,
broadcast, hcat, typed_hcat, map, parent

"""
RowVector(vector)
Expand Down
4 changes: 2 additions & 2 deletions src/Multivariate/Multivariate.jl
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
export grad, lap, curl

abstract type MultivariateFun{T,N} <: Function end
const BivariateFun{T} = MultivariateFun{T,2}

export grad, lap, curl

#implements coefficients/values/evaluate
space(f::MultivariateFun{T,N}) where {T,N}=mapreduce(k->space(f,k),,1:N)
domain(f::MultivariateFun{T,N}) where {T,N}=mapreduce(k->domain(f,k),×,1:N)
Expand Down
12 changes: 1 addition & 11 deletions src/Spaces/QuotientSpace.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
import LinearAlgebra: LU, checknonsingular

export QuotientSpace
export QuotientSpace, PathologicalQuotientSpace

struct QuotientSpace{S,O,D,R,LUT<:LU{R}} <: Space{D,R}
space::S
Expand Down Expand Up @@ -110,14 +108,6 @@ function mutable_lu!(F::LU{T}, ::Val{Pivot} = Val(true);
return F
end



import LinearAlgebra.BLAS.@blasfunc
import LinearAlgebra: chkstride1, BlasInt
import LinearAlgebra.LAPACK.chklapackerror

export PathologicalQuotientSpace

struct PathologicalQuotientSpace{S,O<:Operator,DD,T,RT} <: Space{DD,T}
space::S
bcs::O
Expand Down

0 comments on commit 2842691

Please sign in to comment.