9 #include <alignment/GlobalDerivatives.h> 
   19       m_globals.second.ResizeTo(globals.second);
 
   31       if (globals.first.empty())
 
   38       TMatrixD allDerivatives(
main.second.GetNrows(), 
main.second.GetNcols() + globals.second.GetNcols());
 
   39       allDerivatives.Zero();
 
   40       allDerivatives.SetSub(0, 0, 
main.second);
 
   41       allDerivatives.SetSub(0, 
main.second.GetNcols(), globals.second);
 
   44       main.first.insert(
main.first.end(), globals.first.begin(), globals.first.end());
 
   46       main.second.ResizeTo(allDerivatives);
 
   47       main.second = allDerivatives;
 
   56       m_globals.second.ResizeTo(nRows, nCols + 1);
 
   57       for (
int iRow = 0; iRow < nRows; ++iRow) {
 
   58         m_globals.second(iRow, nCols) = dResiduals_dParam.at(iRow);
 
   63       std::vector<double> dResiduals_dParam(
m_globals.second.GetNrows(), 0.);
 
   64       dResiduals_dParam.at(0) = drudp;
 
   65       add(paramLabel, dResiduals_dParam);
 
   69       TMatrixD newMatrix(globals.second.GetNrows(), 0);
 
   70       std::vector<int> newLabels;
 
   72       for (
unsigned int iOldCol = 0; iOldCol < globals.first.size(); ++iOldCol) {
 
   73         auto label = globals.first.at(iOldCol);
 
   77         newLabels.push_back(label);
 
   78         newMatrix.ResizeTo(globals.second.GetNrows(), newMatrix.GetNcols() + 1);
 
   79         for (
int iRow = 0; iRow < globals.second.GetNrows(); ++iRow) {
 
   80           newMatrix(iRow, newMatrix.GetNcols() - 1) = globals.second(iRow, iOldCol);
 
   83       return {newLabels, newMatrix};
 
static std::pair< std::vector< int >, TMatrixD > passGlobals(std::pair< std::vector< int >, TMatrixD > globals)
Static convenient function to remove columns with zero labels (make error in Pede btw....
GlobalDerivatives(int dim=2)
Constructor for empty derivative matrix and label vector.
void add(const std::pair< std::vector< int >, TMatrixD > &globals)
Add another set of global labels and derivatives.
std::pair< std::vector< int >, TMatrixD > m_globals
The global labels and derivatives matrix.
Abstract base class for different kinds of events.
int main(int argc, char **argv)
Run all tests.