Hi, thank you for your excellent work and for open-sourcing this project.
const std::vector<int> coeff_ind0 = {0, 6, 12, 1, 7, 13, 2, 8, 0, 6, 12, 14, 6, 0, 12, 1, 7, 13, 3,
9, 2, 8, 14, 15, 4, 10, 7, 1, 16, 13, 8, 2, 6, 12, 0, 14, 9, 3,
8, 14, 2, 15, 3, 9, 15, 4, 10, 16, 7, 13, 1, 5, 11, 10, 4, 17, 16};
const std::vector<int> coeff_ind1 = {11, 17, 5, 9, 15, 3, 5, 11, 17, 10, 16, 4, 11, 5, 17};
const std::vector<int> ind0 = {0, 1, 9, 12, 13, 21, 24, 25, 26, 28, 29, 33, 39, 42, 47,
50, 52, 53, 60, 61, 62, 64, 65, 69, 72, 73, 75, 78, 81, 83,
87, 90, 91, 92, 94, 95, 99, 102, 103, 104, 106, 107, 110, 112, 113,
122, 124, 125, 127, 128, 130, 132, 133, 135, 138, 141, 143};
const std::vector<int> ind1 = {7, 8, 10, 19, 20, 22, 26, 28, 29, 31, 32, 34, 39, 42, 47};
Eigen::MatrixXd C0 = Eigen::MatrixXd::Zero(12, 12);
Eigen::MatrixXd C1 = Eigen::MatrixXd::Zero(12, 4);
for (int k = 0; k < ind0.size(); k++) {
int i = ind0[k] % 12;
int j = ind0[k] / 12;
C0(i, j) = coeffs[coeff_ind0[k]];
}
for (int k = 0; k < ind1.size(); k++) {
int i = ind1[k] % 12;
int j = ind1[k] / 12;
C1(i, j) = coeffs[coeff_ind1[k]];
}
Eigen::MatrixXd C2 = C0.colPivHouseholderQr().solve(C1);
Eigen::Matrix4d AM;
AM << Eigen::RowVector4d(0, 0, 1, 0), -C2.row(9), -C2.row(10), -C2.row(11);
I’ve read the associated paper and the references, but I’m still having trouble understanding how the construction of the matrices C0, C1is derived — especially how the index vectors (coeff_ind0, ind0, etc.) correspond to the mathematical formulation.
Any pointers to a specific part of the paper or an external reference would also be greatly appreciated.
Hi, thank you for your excellent work and for open-sourcing this project.
While studying the implementation, I came across the following code block in
src/solver.cpp(lines 76–102):I’ve read the associated paper and the references, but I’m still having trouble understanding how the construction of the matrices
C0,C1is derived — especially how the index vectors (coeff_ind0,ind0, etc.) correspond to the mathematical formulation.Could you please clarify:
C0andC1?ind0,coeff_ind0) were determined?C0andC1correspond to the matricesAny pointers to a specific part of the paper or an external reference would also be greatly appreciated.
Thanks again for your time and help!