当前位置: 首页>>代码示例>>C++>>正文


C++ MatrixXf::maxCoeff方法代码示例

本文整理汇总了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);
}
开发者ID:NaohiroHayashi,项目名称:bulletsim,代码行数:18,代码来源:plotting_tracking.cpp

示例2: PlotDeltaDensity

	slimage::Image3ub PlotDeltaDensity(const Eigen::MatrixXf& dd)
	{
		return PlotDeltaDensity(dd, 
			std::max(std::abs(dd.minCoeff()), std::abs(dd.maxCoeff())));
	}
开发者ID:Danvil,项目名称:dasp,代码行数:5,代码来源:Visualization.cpp

示例3: PlotDensity

	slimage::Image3ub PlotDensity(const Eigen::MatrixXf& d) {
		return PlotDensity(d,
			d.minCoeff(), d.maxCoeff());
	}
开发者ID:Danvil,项目名称:dasp,代码行数:4,代码来源:Visualization.cpp


注:本文中的eigen::MatrixXf::maxCoeff方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。