File tree Expand file tree Collapse file tree 2 files changed +18
-5
lines changed
Expand file tree Collapse file tree 2 files changed +18
-5
lines changed Original file line number Diff line number Diff line change 33[ TrigPolys.jl] ( https://github.com/yuanchenyang/TrigPolys.jl ) is a package for
44fast 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
1319The 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
Original file line number Diff line number Diff 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"""
1724struct TrigPoly{T<: AbstractFloat , VT<: AbstractVector{T} }
1825 a0:: T # Constant coefficient
You can’t perform that action at this time.
0 commit comments