Discontinuous Galerkin Library
#include "dg/algorithm.h"
dg::Histogram2D< container > Struct Template Reference

Compute a histogram on a 2D grid. More...

Public Member Functions

 Histogram2D (const dg::Grid2d &g2d, const std::vector< double > &inx, const std::vector< double > &iny)
 Construct a histogram from number of bins and an input vector. More...
 
double operator() (double x, double y) const
 Access computed histogram. More...
 

Detailed Description

template<class container = thrust::host_vector<double>>
struct dg::Histogram2D< container >

Compute a histogram on a 2D grid.

Template Parameters
container

Constructor & Destructor Documentation

◆ Histogram2D()

template<class container = thrust::host_vector<double>>
dg::Histogram2D< container >::Histogram2D ( const dg::Grid2d g2d,
const std::vector< double > &  inx,
const std::vector< double > &  iny 
)
inline

Construct a histogram from number of bins and an input vector.

Parameters
g2dgrid on which to compute the histogram ( grid.h() is the binwidth)
inxinput vector in x - direction (if grid.x0() < in[i] <grid.x1() it falls in a bin)
inyinput vector in y - direction (if grid.y0() < in[i] <grid.y1() it falls in a bin)

Member Function Documentation

◆ operator()()

template<class container = thrust::host_vector<double>>
double dg::Histogram2D< container >::operator() ( double  x,
double  y 
) const
inline

Access computed histogram.

Parameters
x
y
Returns

The documentation for this struct was generated from the following file: