Class to compute the SMS location estimator The SMS estimator is the mean value of a set of observations with Small Median of Squared distances.
Definition at line 16 of file SMS.h.
Definition at line 76 of file SMS.cc.
References gather_cfg::cout, debug, mps_fire::i, createfilelist::int, Interpolate, Iterate, gen::k, mag2(), theRatio, theType, tmp, and Weighted.
Referenced by SmsModeFinder3d::operator()().
80 std::cout <<
"[SMS] warning: Weighted SMS was asked for, but data are " 81 <<
"weightless!" << std::endl;
88 std::vector<MyPair> pairs;
90 for ( std::vector< GlobalPoint >::const_iterator
i=
data.begin();
i!=
data.end() ; ++
i )
92 std::vector < float >
D;
94 for ( std::vector< GlobalPoint >::const_iterator j=
data.begin(); j!=
data.end() ; ++j )
95 { D.push_back ( (*j - *
i).
mag2() ); }
97 sort( D.begin(), D.end() );
98 MyPair
tmp ( D[nq-1], &(*
i) );
99 pairs.push_back (
tmp );
103 sort( pairs.begin(), pairs.end(), Sorter() );
109 return *(pairs.begin()->second);
121 std::vector < GlobalPoint > data1;
122 std::vector<MyPair>::iterator j;
124 for ( j=pairs.begin(); j-pairs.begin()<nq; ++j)
125 data1.push_back(*(j->second));
T mag2() const
The vector magnitude squared. Equivalent to vec.dot(vec)
DecomposeProduct< arg, typename Div::arg > D
std::vector< std::vector< double > > tmp
char data[epos_bytes_allocation]
GlobalPoint location(const std::vector< GlobalPoint > &) const