OmniSciDB  b28c0d5765
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GeoRasterTableFunctions.cpp File Reference
#include <cmath>
#include <vector>
#include <tbb/parallel_for.h>
#include <tbb/task_arena.h>
#include "Shared/TableFunctionsCommon.hpp"
#include "Shared/math_consts.h"
+ Include dependency graph for GeoRasterTableFunctions.cpp:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

std::vector< double > generate_1d_gaussian_kernel (const int64_t fill_radius, double sigma)
 

Variables

const size_t max_inputs_per_thread = 1000000L
 
const size_t max_temp_output_entries = 200000000L
 

Function Documentation

std::vector<double> generate_1d_gaussian_kernel ( const int64_t  fill_radius,
double  sigma 
)

Definition at line 390 of file GeoRasterTableFunctions.cpp.

References M_PI.

Referenced by GeoRaster< T, Z >::fill_bins_from_gaussian_neighborhood().

390  {
391  const int64_t kernel_size = fill_radius * 2 + 1;
392  std::vector<double> gaussian_kernel(kernel_size);
393  const double expr = 1.0 / (sigma * sqrt(2.0 * M_PI));
394  for (int64_t kernel_idx = -fill_radius; kernel_idx <= fill_radius; ++kernel_idx) {
395  gaussian_kernel[kernel_idx + fill_radius] =
396  expr * exp((kernel_idx * kernel_idx) / (-2.0 * (sigma * sigma)));
397  }
398  return gaussian_kernel;
399 }
#define M_PI
Definition: constants.h:25

+ Here is the caller graph for this function:

Variable Documentation

const size_t max_temp_output_entries = 200000000L

Definition at line 28 of file GeoRasterTableFunctions.cpp.

Referenced by GeoRaster< T, Z >::computeParallelImpl().