Skip to content

Commit 34eb409

Browse files
committed
Cite D17 book
1 parent dbb623b commit 34eb409

File tree

2 files changed

+18
-5
lines changed

2 files changed

+18
-5
lines changed

docs/src/index.md

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,18 @@
33
[TrigPolys.jl](https://github.com/yuanchenyang/TrigPolys.jl) is a package for
44
fast manipulation of trigonometric polynomials.
55

6-
7-
A trignometric polynomial is defined on $$x \in [0,2\pi)$$ by
8-
6+
A *Hermitian trigonometric polynomial*
7+
can be viewed as a polynomial `R(z) \\in \\mathbb{C}[z]` [D17, (1.7)]:
98
```math
10-
p(x) = a_0 + \sum_{k=1}^n a_k \cos(kx) + a_{-k} \sin(kx)
9+
R(z) = a_0 + \\frac{1}{2} \\sum_{k=1}^n a_k z^{-k} + a_k^* z^k
1110
```
11+
On the unit circle, this becomes [D17, (1.8)]:
12+
```math
13+
R(\\omega) = a_0 + \\sum_{k=1}^n a_{c,k} \\cos(k\\omega) + a_{s,k} \\sin(k\\omega)
14+
```
15+
where ``a_{c,k}`` is `ac[k]` and ``a_{s,k}`` is `as[k]`.
16+
17+
[D17] ...
1218

1319
The polynomial $$p(x)$$ can be represented either by $$2n+1$$ coefficients
1420
$$a_k$$ or by evaluations at $$2n+1$$ distinct points in the interval

src/TrigPolys.jl

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,14 @@ export pad_to, truncate
1212
as::VT # sin coefficients
1313
end
1414
15-
Represents a trigonometric polynomial by its coefficients.
15+
Represents a *Hermitian trigonometric polynomial* by its coefficients.
16+
The vectors `ac` and `as` should have the same length, that we call `n` in this
17+
docstring.
18+
This represent the following function
19+
```julia
20+
R(ω) = a0 + sum(ac[k] * cos(k * ω) + as[k] * sin(k * ω) for k in 1:n)
21+
```
22+
which is a polynomial in the variable `x = cos(ω)`.
1623
"""
1724
struct TrigPoly{T<:AbstractFloat, VT<:AbstractVector{T}}
1825
a0::T # Constant coefficient

0 commit comments

Comments
 (0)