22 #ifdef SEPARATE_REGRESSION_RECONSTRUCTION
36 #ifdef SEPARATE_REGRESSION_RECONSTRUCTION
37 std::vector<std::vector<Projection>> projections;
41 Matrix parameters = Matrix::Zero(output.rows(),
input.rows());
44 for (
int d = 0; d < output.rows(); d++)
47 #ifdef SEPARATE_REGRESSION_RECONSTRUCTION
48 projections.push_back(std::vector<Projection>());
52 Vector output_d = output.row(d);
58 for (
int k = 0; k <
input.rows(); k++)
61 Vector u = input_d * output_d;
62 Vector s = input_d.transpose() * u;
64 output_d = output_d -
q *
s;
65 Real mean_error = output_d.array().abs().mean();
68 input_d = input_d - p *
s.transpose();
70 #ifdef SEPARATE_REGRESSION_RECONSTRUCTION
71 projections[d].push_back(Projection(p, u,
q));
75 s = identity.transpose() * u;
76 parameters.row(d) +=
q *
s.transpose();
77 identity -= p *
s.transpose();
80 if (mean_error < threshold)