ssmkit
master-68aed98
Main Page
Related Pages
Namespaces
Classes
Files
File List
ess.hpp
Go to the documentation of this file.
1
7
#ifndef SSMPACK_FILTER_RESAMPLER_CRITERION_ESS
8
#define SSMPACK_FILTER_RESAMPLER_CRITERION_ESS
9
10
#include <armadillo>
11
12
namespace
ssmkit {
13
namespace
filter {
14
namespace
resampler {
15
namespace
criterion {
16
17
struct
ESS
{
18
double
th
;
22
ESS
(
double
threshold) :
th
{threshold} {}
23
ESS
() =
delete
;
28
bool
operator()
(
const
arma::vec &w){
29
return
arma::sum(w)/arma::sum(arma::square(w)) <
th
;
30
}
31
32
};
33
}
// namespace criterion
34
}
// namespace resampler
35
}
// namespace filter
36
}
// namespace ssmkit
37
#endif // SSMPACK_FILTER_RESAMPLER_CRITERION_ESS
ssmkit::filter::resampler::criterion::ESS::th
double th
Definition:
ess.hpp:18
ssmkit::filter::resampler::criterion::ESS::ESS
ESS(double threshold)
Definition:
ess.hpp:22
ssmkit::filter::resampler::criterion::ESS
Definition:
ess.hpp:17
ssmkit::filter::resampler::criterion::ESS::operator()
bool operator()(const arma::vec &w)
return true if number of effective samples with weights w falls bellow the threshold ...
Definition:
ess.hpp:28
ssmkit::filter::resampler::criterion::ESS::ESS
ESS()=delete
src
ssmkit
filter
resampler
criterion
ess.hpp
Generated on Thu Jul 21 2016 11:41:12 for ssmkit by
1.8.6