Discontinuous Galerkin Library
#include "dg/algorithm.h"

Compute (lower) Median of input numbers. More...

Public Member Functions

template<class real_type >
DG_DEVICE void operator() (unsigned i, const int *row_offsets, const int *column_indices, const real_type *values, const real_type *x, real_type *y)
 

Detailed Description

Compute (lower) Median of input numbers.

The (lower) median of N numbers is the N/2 (rounded up) largest number. Another definition is implicit \( \text{Median}(x) := \{ m : \sum_i \text{sgn}(x_i - m) = 0\} \) The Median is taken over all points contained in the stencil given by the row and column indices. The matrix values are ignored.

See also
dg::blas2::stencil dg::create::window_stencil

Member Function Documentation

◆ operator()()

template<class real_type >
DG_DEVICE void dg::CSRMedianFilter::operator() ( unsigned  i,
const int *  row_offsets,
const int *  column_indices,
const real_type *  values,
const real_type *  x,
real_type *  y 
)
inline

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