Skip to content

Commit c317a81

Browse files
authored
Remove dependency on FFTW (#61)
* Remove dependency on FFTW * Add note * Use test/Project.toml environment
1 parent f1aaf99 commit c317a81

File tree

6 files changed

+36
-10
lines changed

6 files changed

+36
-10
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Manifest.toml

Project.toml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,10 @@ version = "0.6.3"
44

55
[deps]
66
AbstractFFTs = "621f4979-c628-5d54-868e-fcf4e3e8185c"
7-
FFTW = "7a1cc6ca-52ef-59f5-83cd-3a7055c09341"
87
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
98
StatsBase = "2913bbd2-ae8a-5f71-8c99-4fb6c76f3a91"
109

1110
[compat]
1211
AbstractFFTs = "0.4, 0.5, 1"
13-
FFTW = "1"
1412
StatsBase = "0.32, 0.33"
1513
julia = "1"
16-
17-
[extras]
18-
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
19-
20-
[targets]
21-
test = ["Test"]

README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,16 @@ ToeplitzMatrices.jl
88
Fast matrix multiplication and division
99
for Toeplitz, Hankel and circulant matrices in Julia
1010

11+
# Note
12+
13+
Some computations such as multiplication of large matrices are performed with FFTs.
14+
To be able to use these methods, you have to install and load a package that implements
15+
the [AbstractFFTs.jl](https://github.com/JuliaMath/AbstractFFTs.jl) interface such
16+
as [FFTW.jl](https://github.com/JuliaMath/FFTW.jl):
17+
18+
```julia
19+
using FFTW
20+
```
1121

1222
## ToeplitzMatrix
1323

src/ToeplitzMatrices.jl

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,9 @@ import Base: convert, *, \, getindex, print_matrix, size, Matrix, +, -, copy, si
77
import LinearAlgebra: BlasReal, Cholesky, DimensionMismatch, cholesky, cholesky!, eigvals, inv, ldiv!,
88
mul!, pinv, rmul!, tril, triu
99

10-
using FFTW
11-
using FFTW: Plan
10+
using AbstractFFTs
11+
using AbstractFFTs: Plan
12+
1213
flipdim(A, d) = reverse(A, dims=d)
1314

1415
export Toeplitz, SymmetricToeplitz, Circulant, TriangularToeplitz, Hankel,

test/Project.toml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
[deps]
2+
AbstractFFTs = "621f4979-c628-5d54-868e-fcf4e3e8185c"
3+
FFTW = "7a1cc6ca-52ef-59f5-83cd-3a7055c09341"
4+
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
5+
Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
6+
StatsBase = "2913bbd2-ae8a-5f71-8c99-4fb6c76f3a91"
7+
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
8+
9+
[compat]
10+
AbstractFFTs = "0.4, 0.5, 1"
11+
FFTW = "1"
12+
StatsBase = "0.32, 0.33"
13+
julia = "1"

test/runtests.jl

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
using Pkg
2+
3+
# Activate test environment on older Julia versions
4+
@static if VERSION < v"1.2"
5+
Pkg.activate(@__DIR__)
6+
Pkg.develop(PackageSpec(; path=dirname(@__DIR__)))
7+
Pkg.instantiate()
8+
end
9+
110
using ToeplitzMatrices, StatsBase, Test, LinearAlgebra
211

312
using Base: copyto!

0 commit comments

Comments
 (0)