本文整理汇总了C++中Match::explain方法的典型用法代码示例。如果您正苦于以下问题:C++ Match::explain方法的具体用法?C++ Match::explain怎么用?C++ Match::explain使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Match
的用法示例。
在下文中一共展示了Match::explain方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: apply
void RemoveDuplicateReviewsOp::apply(shared_ptr<OsmMap>& map)
{
_map = map;
// go through all the relations to get duplicate reviews
const RelationMap& relations = map->getRelationMap();
QMap< set<ElementId>, QList<ReviewMarker::ReviewUid> > membersToReview;
for (RelationMap::const_iterator it = relations.begin(); it != relations.end(); it++)
{
ElementId eid = ElementId::relation(it->first);
if (ReviewMarker::isReviewUid(map, eid))
{
membersToReview[ReviewMarker::getReviewElements(map, eid)].append(eid);
}
}
//loop through dupplicate reviews
QMap< set<ElementId>, QList<ReviewMarker::ReviewUid> >::iterator it = membersToReview.begin();
while (it != membersToReview.end())
{
set<ElementId> eids = it.key();
//remove duplicate reviews
QList<ReviewMarker::ReviewUid> duplicateReviews = it.value();
//Only remove reviews and process if there is more than one review
// See discussion here: https://github.com/ngageoint/hootenanny/issues/81#issuecomment-162980656
if (eids.size() == 2 && duplicateReviews.size() > 1)
{
for (int i = 0; i < duplicateReviews.size(); i++)
{
ReviewMarker::removeElement(map, duplicateReviews[i]);
}
ElementId beid = *eids.begin();
ElementId eeid = *eids.rbegin();
OsmMapPtr copy(new OsmMap());
CopySubsetOp(map, beid, eeid).apply(copy);
copy->getElement(beid)->setStatus(Status::Unknown1);
copy->getElement(eeid)->setStatus(Status::Unknown2);
Match* match = MatchFactory::getInstance().createMatch(copy, beid, eeid);
if (match && match->getType() != MatchType::Miss)
{
QString explain = match->explain();
if (match->getType() == MatchType::Match)
{
if (explain.isEmpty())
{
explain = "Multiple overlapping high confidence reviews";
}
else
{
explain = "Multiple overlapping high confidence reviews: " + explain;
}
}
ReviewMarker::mark(map, map->getElement(beid), map->getElement(eeid),
explain, match->getMatchName(), match->getClassification().getReviewP());
}
}
++it;
}
}