MCPcopy Create free account
hub / github.com/TUC-ProAut/libRSF / removeOffset

Method removeOffset

src/error_models/GaussianMixture.cpp:55–80  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

53
54 template<>
55 Vector1 GaussianMixture<1>::removeOffset()
56 {
57 int NumberOfComponents = this->getNumberOfComponents();
58 Vector1 MeanLOS;
59
60 this->sortComponentsByWeight();
61 double MinimumWeight = std::min(_Mixture.at(0).getWeight()(0), 0.2);
62
63 /** remove offset of the first "LOS" component */
64 this->sortComponentsByMean();
65 for(int i = 0; i < NumberOfComponents; ++i)
66 {
67 if(_Mixture.at(i).getWeight()(0) >= MinimumWeight)
68 {
69 MeanLOS = _Mixture.at(i).getMean();
70 break;
71 }
72 }
73
74 for(int i = 0; i < NumberOfComponents; ++i)
75 {
76 _Mixture.at(i).setMean(_Mixture.at(i).getMean() - MeanLOS);
77 }
78
79 return MeanLOS;
80 }
81
82 template<>
83 void GaussianMixture<1>::removeGivenOffset(const Vector1 &Offset)

Callers 2

TuneErrorModelFunction · 0.80
TuneErrorModelFunction · 0.80

Calls 6

getNumberOfComponentsMethod · 0.95
sortComponentsByMeanMethod · 0.95
getWeightMethod · 0.80
getMeanMethod · 0.45
setMeanMethod · 0.45

Tested by

no test coverage detected