/
githubmirror
/
cmssw
Обзор
Документация
Войти
/
githubmirror
/
cmssw
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
Alignment/CommonAlignmentAlgorithm/src/AlignmentExtendedCorrelationsEntry.cc
50 строк
2 KB
Cms Build
Clang-Format
09 май 2019, 07:16
09 май 2019, 07:16
7f0c057
Код
Авторство
О чём код?
#include "Alignment/CommonAlignmentAlgorithm/interface/AlignmentExtendedCorrelationsEntry.h" AlignmentExtendedCorrelationsEntry::AlignmentExtendedCorrelationsEntry(void) : // theCounter( 0 ), theNRows(0), theNCols(0) {} AlignmentExtendedCorrelationsEntry::AlignmentExtendedCorrelationsEntry(short unsigned int nRows, short unsigned int nCols) : // theCounter( 0 ), theNRows(nRows), theNCols(nCols), theData(nRows * nCols) {} AlignmentExtendedCorrelationsEntry::AlignmentExtendedCorrelationsEntry(short unsigned int nRows, short unsigned int nCols, const float init) : // theCounter( 0 ), theNRows(nRows), theNCols(nCols), theData(nRows * nCols, init) {} AlignmentExtendedCorrelationsEntry::AlignmentExtendedCorrelationsEntry(const AlgebraicMatrix& mat) : // theCounter( 0 ), theNRows(mat.num_row()), theNCols(mat.num_col()), theData(mat.num_row() * mat.num_col()) { for (int i = 0; i < mat.num_row(); ++i) { for (int j = 0; j < mat.num_col(); ++j) { theData[i * theNCols + j] = mat[i][j]; } } } void AlignmentExtendedCorrelationsEntry::operator*=(const float multiply) { for (std::vector<float>::iterator it = theData.begin(); it != theData.end(); ++it) (*it) *= multiply; } AlgebraicMatrix AlignmentExtendedCorrelationsEntry::matrix(void) const { AlgebraicMatrix result(theNRows, theNCols); for (int i = 0; i < theNRows; ++i) { for (int j = 0; j < theNCols; ++j) { result[i][j] = theData[i * theNCols + j]; } } return result; }