11 #include "complexmatrix.h"
23 enum GRID_TYPES { GaussLegendre,
27 EvenSpaced, EvenSpaced_TF,
30 static const string GRID_TYPES_NOTES[GRID_TYPES::COUNT];
31 static const bool SUPPORT_TIME_GRIDS[GRID_TYPES::COUNT];
32 static GRID_TYPES get_grid_type(
const string& grid_str);
39 vector<double> freq_nodes;
40 vector<double> freq_weights;
41 vector<double> time_nodes;
42 vector<double> time_weights;
65 TFGrids::GRID_TYPES get_grid_type()
const {
return grid_type; }
70 void reset(
unsigned N);
75 size_t size()
const {
return n_grids; }
76 const vector<double> get_freq_nodes()
const {
return freq_nodes; }
77 const vector<double> get_freq_weights()
const {
return freq_weights; }
78 const vector<double> get_time_nodes()
const {
return time_nodes; }
79 const vector<double> get_time_weights()
const {
return time_weights; }
81 const matrix &get_costrans_t2f()
const {
return costrans_t2f; }
82 const matrix &get_sintrans_t2f()
const {
return sintrans_t2f; }
83 const matrix &get_costrans_f2t()
const {
return costrans_f2t; }
84 const matrix &get_sintrans_f2t()
const {
return sintrans_f2t; }
85 int get_time_index(
const double &time)
const;
86 int get_freq_index(
const double &freq)
const;
87 const pair<int, int> get_tf_index(
const pair<double, double> &tf)
const;
102 void generate_GaussLegendre();
103 bool has_time_grids()
const {
return time_nodes.size() > 0; }
Object to handle time/frequency grids for quadrature.
Definition: timefreq.h:21
size_t get_n_grids() const
get the number of grid points
Definition: timefreq.h:73
void generate_GaussChebyshevII()
Generate Gauss-Chebyshev quadrature of second kind on [0, infty)
Definition: timefreq.cpp:229
size_t size() const
alias to get_n_grids
Definition: timefreq.h:75
void generate_evenspaced(double emin, double interval)
Generate the even-spaced frequency grid.
Definition: timefreq.cpp:130
void generate_evenspaced_tf(double emin, double eintv, double tmin, double tintv)
Generate the even-spaced time-frequency grid.
Definition: timefreq.cpp:145
double find_freq_weight(const double &freq) const
obtain the integral weight from the frequency value
Definition: timefreq.cpp:284
void generate_minimax(double emin, double emax)
Generate the minimax time-frequency grid.
Definition: timefreq.cpp:167
void generate_GaussChebyshevI()
Generate Gauss-Chebyshev quadrature of first kind on [0, infty)
Definition: timefreq.cpp:215
utilies to handle square matrix and related operations