22 #ifdef SEPARATE_REGRESSION_RECONSTRUCTION
35 #ifdef SEPARATE_REGRESSION_RECONSTRUCTION
36 std::vector<std::vector<Projection> > projections;
40 Matrix parameters = Matrix::Zero(output.rows(),
input.rows());
43 for (
int d = 0; d < output.rows(); d++)
46 #ifdef SEPARATE_REGRESSION_RECONSTRUCTION
47 projections.push_back(std::vector<Projection>());
51 Vector output_d = output.row(d);
57 for (
int k = 0; k <
input.rows(); k++)
60 Vector u = input_d * output_d;
61 Vector s = input_d.transpose() * u;
63 output_d = output_d -
q *
s;
64 Real mean_error = output_d.array().abs().mean();
67 input_d = input_d - p *
s.transpose();
69 #ifdef SEPARATE_REGRESSION_RECONSTRUCTION
70 projections[d].push_back(Projection(p, u,
q));
74 s = identity.transpose() * u;
75 parameters.row(d) +=
q *
s.transpose();
76 identity -= p *
s.transpose();
79 if (mean_error < threshold)