Skip to content

Commit b91be32

Browse files
authored
Build out documentation (#33)
* Fix deploydocs * Add major documentation Co-authored-by: Danny Sharp <[email protected]>
1 parent f5952dc commit b91be32

File tree

3 files changed

+78
-1
lines changed

3 files changed

+78
-1
lines changed

docs/make.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,5 @@ makedocs(
1111
# See "Hosting Documentation" and deploydocs() in the Documenter manual
1212
# for more information.
1313
deploydocs(
14-
repo = "github.com/dannys4/FFTA.jl"
14+
repo = "github.com/dannys4/FFTA.jl.git"
1515
)

docs/src/index.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
11
# FFTA.jl
22

33
Documentation for FFTA.jl
4+
5+
```@docs
6+
fft
7+
bfft
8+
```

src/FFTA.jl

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,21 @@ export fft, bfft
66
include("callgraph.jl")
77
include("algos.jl")
88

9+
"""
10+
$(TYPEDSIGNATURES)
11+
Perform a fast Fourier transform of a vector. Preserves types given by the
12+
user.
13+
14+
# Arguments
15+
x::AbstractVector: The vector to transform.
16+
17+
# Examples
18+
```julia
19+
julia> x = rand(ComplexF64, 10)
20+
21+
julia> y = fft(x)
22+
```
23+
"""
924
function fft(x::AbstractVector{T}) where {T}
1025
y = similar(x)
1126
g = CallGraph{T}(length(x))
@@ -20,6 +35,21 @@ function fft(x::AbstractVector{T}) where {T <: Real}
2035
y
2136
end
2237

38+
"""
39+
$(TYPEDSIGNATURES)
40+
Perform a fast Fourier transform of a matrix. Preserves types given by the
41+
user.
42+
43+
# Arguments
44+
x::AbstractMatrix: The matrix to transform (columnwise then rowwise).
45+
46+
# Examples
47+
```julia
48+
julia> x = rand(ComplexF64, 10, 10)
49+
50+
julia> y = fft(x)
51+
```
52+
"""
2353
function fft(x::AbstractMatrix{T}) where {T}
2454
M,N = size(x)
2555
y1 = similar(x)
@@ -54,6 +84,27 @@ function fft(x::AbstractMatrix{T}) where {T <: Real}
5484
y2
5585
end
5686

87+
"""
88+
$(TYPEDSIGNATURES)
89+
Perform a backward fast Fourier transform of a vector, where "backward"
90+
indicates the same output signal down to a constant factor. Preserves types
91+
given by the user.
92+
93+
# Arguments
94+
x::AbstractVector: The vector to transform
95+
96+
# Examples
97+
```julia
98+
julia> x = rand(ComplexF64, 10)
99+
100+
julia> y = bfft(x)
101+
102+
julia> z = fft(y)
103+
104+
julia> x ≈ z/10
105+
true
106+
```
107+
"""
57108
function bfft(x::AbstractVector{T}) where {T}
58109
y = similar(x)
59110
g = CallGraph{T}(length(x))
@@ -68,6 +119,27 @@ function bfft(x::AbstractVector{T}) where {T <: Real}
68119
y
69120
end
70121

122+
"""
123+
$(TYPEDSIGNATURES)
124+
Perform a backward fast Fourier transform of a matrix, where "backward"
125+
indicates the same output signal down to a constant factor. Preserves types
126+
given by the user.
127+
128+
# Arguments
129+
x::AbstractMatrix: The matrix to transform
130+
131+
# Examples
132+
```julia
133+
julia> x = rand(ComplexF64, 10, 10)
134+
135+
julia> y = bfft(x)
136+
137+
julia> z = fft(y)
138+
139+
julia> x ≈ z/100
140+
true
141+
```
142+
"""
71143
function bfft(x::AbstractMatrix{T}) where {T}
72144
M,N = size(x)
73145
y1 = similar(x)

0 commit comments

Comments
 (0)