38 Matrix1D<T>& shiftYt,
int verbosity,
int iterations) {
43 std::vector<Matrix1D<double>> shifts(2);
67 std::cout <<
"Solving equation system ...\n";
76 ex = bX - helper.
A * shiftX;
77 ey = bY - helper.
A * shiftY;
84 double R2x = 1 - (stddeveX * stddeveX) / varbX;
85 double R2y = 1 - (stddeveY * stddeveY) / varbY;
87 std::cout <<
"Iteration " << it <<
" R2x=" << R2x <<
" R2y=" << R2y
91 double oldWeightSum = helper.
w.
sum();
97 double newWeightSum = helper.
w.
sum();
98 if ((newWeightSum == oldWeightSum) && (verbosity > 1)){
99 std::cout <<
"No outlier found\n\n";
101 }
else if (verbosity > 1)
102 std::cout <<
"Found " << (int) (oldWeightSum - newWeightSum)
106 }
while (it < iterations);
std::vector< Matrix1D< double > > bs
#define FOR_ALL_ELEMENTS_IN_MATRIX1D(v)
static void solve(Matrix1D< T > &bXt, Matrix1D< T > &bYt, Matrix2D< T > &At, Matrix1D< T > &shiftXt, Matrix1D< T > &shiftYt, int verbosity, int iterations)
double sum(bool average=false) const
void typeCast(const Matrix1D< T1 > &v1, Matrix1D< T2 > &v2)
void resizeNoCopy(int Xdim)
void computeMeanAndStddev(double &mean, double &stddev) const
void weightedLeastSquares(WeightedLeastSquaresHelper &h, Matrix1D< double > &result)