27 if(this->err == right.err)
28 return this->key < right.key;
29 return this->err < right.err;
33 return (this->err != right.err) || (this->key != right.key);
40 virtual std::ostream&
info(std::ostream& os)
const {
41 return os <<
"error_index("<<err<<
","<<key<<
")";
53 template<
class F= concepts::Real>
60 typename concepts::LocalEstimator<F>::const_iterator iter;
62 for( iter= locEstimator->begin(); iter != locEstimator->end(); ++iter)
63 locErrors.insert(
error_index(iter->first, iter->second));
70 for( uint i = 0; (iterSet != locErrors.rend()) && i < no; ++i)
71 this->mark_.insert((iterSet++)->key);
82 virtual std::ostream&
info(std::ostream& os)
const {
83 return os <<
"Absolute Marking( "<< this->mark_<<
")";
101 template<
class F= concepts::Real>
108 typename concepts::LocalEstimator<F>::const_iterator iter;
110 for( iter= locEstimator->begin(); iter != locEstimator->end(); ++iter)
111 locErrors.insert(
error_index(iter->first, iter->second));
118 for( iter= locEstimator->begin(); iter != locEstimator->end(); ++iter){
119 if(iter->second > theta * maxErr )
120 this->mark_.insert(iter->first);
132 virtual std::ostream&
info(std::ostream& os)
const {
133 return os <<
"Marking( "<< this->mark_<<
")";
158 template<
class F= concepts::Real>
163 typename concepts::LocalEstimator<F>::const_iterator iter;
164 for( iter = estimator.begin(); iter != estimator.end(); ++iter)
165 sum += iter->second * iter->second;
167 oEta_2_ = sum / estimator.nelm();
169 for( iter = estimator.begin(); iter != estimator.end(); ++iter){
170 if (sigma * oEta_2_ < iter->second * iter->second)
171 this->mark_.insert(iter->first);
178 virtual std::ostream&
info(std::ostream& os)
const {
179 os <<
"MVMarking[ mean error = " << oEta_2_ <<
" << sigma_ = "<< sigma_ <<
" #marked Elements = "<<this->mark_.size() <<
"]";
180 return os <<
" marked elements : "<< this->mark_ << std::endl;
#define conceptsException(exc)
AMarking(const concepts::Estimator< F > &estimator, uint no)
virtual std::ostream & info(std::ostream &os) const
Returns information in an output stream.
BMarking(const concepts::Estimator< F > &estimator, concepts::Real theta=0.7)
virtual std::ostream & info(std::ostream &os) const
Returns information in an output stream.
virtual std::ostream & info(std::ostream &os) const
Returns information in an output stream.
MVMarking(const concepts::LocalEstimator< F > &estimator, concepts::Real sigma=0.75)
virtual std::ostream & info(std::ostream &os) const
Returns information in an output stream.