本文整理汇总了C++中Mat::in_range方法的典型用法代码示例。如果您正苦于以下问题:C++ Mat::in_range方法的具体用法?C++ Mat::in_range怎么用?C++ Mat::in_range使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Mat
的用法示例。
在下文中一共展示了Mat::in_range方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: expectedMatIn_range
void expectedMatIn_range() {
cout << "- Compute expectedMatIn_range() ... ";
if(_genMat.in_range(_elemInd)) {
save<double>("Mat.in_range", Mat<double>({1}));
} else {
save<double>("Mat.in_range", Mat<double>({0}));
}
cout << "done." << endl;
}
示例2: expectedMatSubmatDivide
void expectedMatSubmatDivide() {
if(!_genMat.in_range(_rowInd, _colInd, size(_matSize.first, _matSize.second))) {
return;
}
_genMat.submat(_rowInd, _colInd, size(_matSize.first, _matSize.second)) /= _genDouble;
cout << "- Compute expectedMatSubmatDivide() ... ";
save<double>("Mat.submatDivide", _genMat);
cout << "done." << endl;
}
示例3: expectedRowsDivide
void expectedRowsDivide() {
for(int n = 0; n < _elemInds.n_elem; n++) {
if(!_genColVec.in_range(_elemInds.at(n))) {
return;
}
}
cout << "- Compute expectedRowsDivide() ... ";
_genColVec.rows(_elemInds) /= _genDouble;
save<double>("Col.rowsDivide", _genColVec);
cout << "done." << endl;
}
示例4: expectedElemTimes
void expectedElemTimes() {
for(int n = 0; n < _elemInds.n_elem; n++) {
if(!_genColVec.in_range(_elemInds.at(n))) {
return;
}
}
cout << "- Compute expectedElemTimes() ... ";
_genColVec.elem(_elemInds) *= _genDouble;
save<double>("Col.elemTimes", _genColVec);
cout << "done." << endl;
}
示例5: expectedElemDivide
void expectedElemDivide() {
for(int n = 0; n < _elemInds.n_elem; n++) {
if(!_genMat.in_range(_elemInds.at(n))) {
return;
}
}
cout << "- Compute expectedElemDivide() ... ";
_genMat.elem(_elemInds) /= _genDouble;
save<double>("Mat.elemDivide", _genMat);
cout << "done." << endl;
}
示例6: expectedMatSwapCols
void expectedMatSwapCols() {
if(_colIndRange.whole) {
return;
}
if(!_genMat.in_range(span::all, _colIndRange)) {
return;
}
cout << "- Compute expectedMatSwapCols() ... ";
_genMat.swap_cols(_colIndRange.a, _colIndRange.b);
save<double>("Mat.swap_cols", _genMat);
cout << "done." << endl;
}
示例7: expectedMatSwapRows
void expectedMatSwapRows() {
if(_rowIndRange.whole) {
return;
}
if(!_genMat.in_range(_rowIndRange, span::all)) {
return;
}
cout << "- Compute expectedMatSwapRows() ... ";
_genMat.swap_rows(_rowIndRange.a, _rowIndRange.b);
save<double>("Mat.swap_rows", _genMat);
cout << "done." << endl;
}