11 #include <alignment/GlobalDerivatives.h>
21 m_globals.second.ResizeTo(globals.second);
33 if (globals.first.empty())
40 TMatrixD allDerivatives(
main.second.GetNrows(),
main.second.GetNcols() + globals.second.GetNcols());
41 allDerivatives.Zero();
42 allDerivatives.SetSub(0, 0,
main.second);
43 allDerivatives.SetSub(0,
main.second.GetNcols(), globals.second);
46 main.first.insert(
main.first.end(), globals.first.begin(), globals.first.end());
48 main.second.ResizeTo(allDerivatives);
49 main.second = allDerivatives;
58 m_globals.second.ResizeTo(nRows, nCols + 1);
59 for (
int iRow = 0; iRow < nRows; ++iRow) {
60 m_globals.second(iRow, nCols) = dResiduals_dParam.at(iRow);
65 std::vector<double> dResiduals_dParam(
m_globals.second.GetNrows(), 0.);
66 dResiduals_dParam.at(0) = drudp;
67 add(paramLabel, dResiduals_dParam);
71 TMatrixD newMatrix(globals.second.GetNrows(), 0);
72 std::vector<int> newLabels;
74 for (
unsigned int iOldCol = 0; iOldCol < globals.first.size(); ++iOldCol) {
75 auto label = globals.first.at(iOldCol);
79 newLabels.push_back(label);
80 newMatrix.ResizeTo(globals.second.GetNrows(), newMatrix.GetNcols() + 1);
81 for (
int iRow = 0; iRow < globals.second.GetNrows(); ++iRow) {
82 newMatrix(iRow, newMatrix.GetNcols() - 1) = globals.second(iRow, iOldCol);
85 return {newLabels, newMatrix};