本文整理汇总了C++中Labels::getShadeLevelMap方法的典型用法代码示例。如果您正苦于以下问题:C++ Labels::getShadeLevelMap方法的具体用法?C++ Labels::getShadeLevelMap怎么用?C++ Labels::getShadeLevelMap使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Labels
的用法示例。
在下文中一共展示了Labels::getShadeLevelMap方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: fillMissingLabels
//! compare two labels and fill in missing labels
void ShadeShapeMatch::fillMissingLabels(Labels &upLabels, Labels &dbLabels) {
map<String,pair<int,float> > &upMap = upLabels.getMap();
map<String,pair<int,float> > &dbMap = dbLabels.getMap();
map<String,int> &upShadeLevelMap = upLabels.getShadeLevelMap();
map<String,int> &dbShadeLevelMap = dbLabels.getShadeLevelMap();
map<String,int> &upShapeNumMap = upLabels.getShapeMap();
map<String,int> &dbShapeNumMap = dbLabels.getShapeMap();
for(auto it=upMap.begin(); it!=upMap.end(); it++) {
String label = it->first;
if(dbMap.find(label)==dbMap.end()) {
dbMap[label] = std::make_pair(0,0.0);
dbShadeLevelMap[label] = upLabels.getShadeLevel(label);
dbShapeNumMap[label] = upLabels.getShapeNum(label);
}
}
for(auto it=dbMap.begin(); it!=dbMap.end(); it++) {
String label = it->first;
if(upMap.find(label)==upMap.end()) {
upMap[label] = std::make_pair(0,0.0);
upShadeLevelMap[label] = dbLabels.getShadeLevel(label);
upShapeNumMap[label] = dbLabels.getShapeNum(label);
}
}
}