本文整理汇总了C++中eigen::MatrixXf::maxCoeff方法的典型用法代码示例。如果您正苦于以下问题:C++ MatrixXf::maxCoeff方法的具体用法?C++ MatrixXf::maxCoeff怎么用?C++ MatrixXf::maxCoeff使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类eigen::MatrixXf
的用法示例。
在下文中一共展示了MatrixXf::maxCoeff方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: drawCorrLines
// draw all the lines between aPts and Pts that have a corr>threshold.
// if aPtInd is in the range of aPts, then draw only the lines that comes from aPts[aPtInd]
void drawCorrLines(PlotLines::Ptr lines, const vector<btVector3>& aPts, const vector<btVector3>& bPts, const Eigen::MatrixXf& corr, float threshold, int aPtInd) {
vector<btVector3> linePoints;
vector<btVector4> lineColors;
float max_corr = corr.maxCoeff(); // color lines by corr, where corr has been mapped [threshold,max_corr] -> [0,1]
for (int i=0; i<corr.rows(); ++i)
for (int j=0; j<corr.cols(); ++j)
if (corr(i,j) > threshold) {
if (aPtInd<0 || aPtInd>=corr.rows() || aPtInd==i) {
linePoints.push_back(aPts[i]);
linePoints.push_back(bPts[j]);
float color_factor = (corr(i,j)-threshold)/(max_corr-threshold); //basically, it ranges from 0 to 1
lineColors.push_back(btVector4(color_factor, color_factor,0,1));
}
}
lines->setPoints(linePoints, lineColors);
}
示例2: PlotDeltaDensity
slimage::Image3ub PlotDeltaDensity(const Eigen::MatrixXf& dd)
{
return PlotDeltaDensity(dd,
std::max(std::abs(dd.minCoeff()), std::abs(dd.maxCoeff())));
}
示例3: PlotDensity
slimage::Image3ub PlotDensity(const Eigen::MatrixXf& d) {
return PlotDensity(d,
d.minCoeff(), d.maxCoeff());
}