82 unsigned int fittingVoteCounter = 0;
85 for (VotedPosePtrs::iterator voteIt = originForFittingVotes.begin(); voteIt != originForFittingVotes.end(); voteIt++)
87 currentVotedPose = *voteIt;
89 if ((sourcesWithFittingVotes.find(currentVotedPose->source) != sourcesWithFittingVotes.end()))
93 if (mRater->isVoteSupportingReference(currentVotedPose, originPose, ratingCache))
98 return fittingVoteCounter;
108 fittingVoteCounter = 0;
109 bestWeight = -mVotingSpaceInEval->epsilon;
112 for (VotedPosePtrs::iterator voteIt = votes.begin(); voteIt != votes.end(); voteIt++)
114 currentVotedPose = *voteIt;
116 if ((sourcesWithFittingVotes.find(currentVotedPose->source) != sourcesWithFittingVotes.end()))
120 if (mRater->isVoteSupportingReference(currentVotedPose, originPose, ratingCache))
123 fittingVoteCounter++;
128 newWeight = mRater->rateAtBackProjectionLevel(currentVotedPose, ratingCache);
129 if(newWeight > bestWeight)
131 bestVotedPose = currentVotedPose;
132 bestWeight = newWeight;
RatingDataPtr ratingCache
bool computeVotingResult(VotingResultPtr &result, TypeToInnerMap votedReferencePoses)
VotingSpacePtr mVotingSpaceInEval
void searchFittingVotes(TypeToInnerMap votes)
void countSupportingOriginForFittingVotes(VotedPosePtrs votes, unsigned int &fittingVoteCounter, double &bestWeight, VotedPosePtr &bestVotedPose)
boost::shared_ptr< VotingResult > VotingResultPtr
boost::shared_ptr< RatingData > RatingDataPtr
SummarizedVotedPosePtrs summarizedFittingVotes
boost::shared_ptr< BaseRater > RaterPtr
std::vector< VotedPosePtr > VotedPosePtrs
VotedPosePtr originForFitting
boost::shared_ptr< VotedPose > VotedPosePtr
std::map< std::string, IdToVoteMap > TypeToInnerMap
VotingResultCalculator(VotingSpacePtr votingSpaceInEval, bool enabledSelfVoteCheck, int raterType=0)
boost::shared_ptr< Pose > PosePtr
boost::shared_ptr< VotingResultCalculator > VotingResultCalculatorPtr
std::set< ObjectPtr > sourcesWithFittingVotes
std::vector< SummarizedVotedPosePtr > SummarizedVotedPosePtrs
unsigned int countSupportingOriginForFittingVotes(VotedPosePtrs originForFittingVotes)
bool enabledSelfVoteCheck
static constexpr double epsilon
boost::shared_ptr< VotingSpace > VotingSpacePtr
this namespace contains all generally usable classes.