1 /*! |
1 /*! |
2 Fourier transform traits |
2 Fourier transform traits |
3 */ |
3 */ |
4 |
4 |
5 use alg_tools::types::{Num, Float}; |
5 use alg_tools::types::{Num, Float}; |
6 use alg_tools::mapping::{RealMapping, Mapping}; |
6 use alg_tools::mapping::{RealMapping, Mapping, Space}; |
7 use alg_tools::bisection_tree::Weighted; |
7 use alg_tools::bisection_tree::Weighted; |
8 use alg_tools::loc::Loc; |
8 use alg_tools::loc::Loc; |
9 |
9 |
10 /// Trait for Fourier transforms. When F is a non-complex number, the transform |
10 /// Trait for Fourier transforms. When F is a non-complex number, the transform |
11 /// also has to be non-complex, i.e., the function itself symmetric. |
11 /// also has to be non-complex, i.e., the function itself symmetric. |
12 pub trait Fourier<F : Num> : Mapping<Self::Domain, Codomain=F> { |
12 pub trait Fourier<F : Num> : Mapping<Self::Domain, Codomain=F> { |
13 type Domain; |
13 type Domain : Space; |
14 type Transformed : Mapping<Self::Domain, Codomain=F>; |
14 type Transformed : Mapping<Self::Domain, Codomain=F>; |
15 |
15 |
16 fn fourier(&self) -> Self::Transformed; |
16 fn fourier(&self) -> Self::Transformed; |
17 } |
17 } |
18 |
18 |