1 #ifndef VTESTBED_CORE_WAVE_NUMBERS_HH     2 #define VTESTBED_CORE_WAVE_NUMBERS_HH     8 #include <vtestbed/base/blitz.hh>     9 #include <vtestbed/base/minmaxmean.hh>    10 #include <vtestbed/core/grid.hh>    23             inline void clear() { length.clear(), number.clear(), height.clear(); }
    35         template <
class T, 
int N>
    36         using Wave_statistics_vector =
    37             blitz::TinyVector<Wave_statistics<T>,N>;
    53             length(lambda), number(k), height(h) {}
   109             find_wave_number_range<T>(halves, grid.lbound(0), grid.ubound(0));
   113         template <
class T, 
int N>
   115         wave_number_grid(
const Wave_statistics_vector<T,N>& waves);
   118         Wave_statistics_vector<T,2>
   119         wave_statistics(blitz::Array<T,2> surface, 
const Grid<T,2>& grid);
   123         temporal_wave_statistics(
   124             blitz::Array<T,1> surface,
   125             const Grid<T,1>& grid
   141 #endif // vim:filetype=cpp A half of the wave with length, number and height of the full wave.
 
std::vector< blitz::TinyVector< T, 2 > > find_extrema(blitz::Array< T, 1 > func, const Grid< T, 1 > &grid)
Find coordinates of minima and maxima of a function.
 
std::vector< Wave_half< T > > find_wave_halves(const std::vector< blitz::TinyVector< T, 2 >> &extrema)
Find wave halves from function extrema computed previously.
 
Estimates sample mean without overflows.
 
A region defined by start and end index and lower and upper bound for each dimension.
 
void find_wave_number_range(const std::vector< Wave_half< T >> &halves, T &min_wave_number, T &max_wave_number)
Find minimum and maximum wave number from wave halves computed previously.