SimpleRater.hpp
Go to the documentation of this file.
1 
18 #pragma once
19 
20 #include "BaseRater.hpp"
21 
22 namespace ISM {
26 class SimpleRater : public BaseRater
27 {
28 public:
29  SimpleRater(double bin_size, double maxAngleDeviation) : BaseRater(bin_size, maxAngleDeviation){}
30 
31  //Methods are inlined for performance reasons.
32 
33  // No input checks at all since that method must run fast.
34  virtual double rateAtBackProjectionLevel(VotedPosePtr& votedPose, RatingDataPtr data)
35  {
36  //Ugly but fast. And we need to be as fast as possible.
37  data == nullptr;
38 
39  return votedPose->weight;
40  }
41 
42  virtual void printRatingAtBackProjectionLevel(VotedPosePtr& votedPose, PosePtr& refPose, RatingDataPtr data)
43  {
44 
45  if (data == nullptr)
46  data = RatingDataPtr(new RatingData());
47 
48  double score;
49 
50  if(this->isVoteSupportingReference(votedPose, refPose, data))
51  score = votedPose->weight;
52  else
53  score = 0.0;
54 
55  std::cout << "SimpleRater score=" << score
56  << "\nNormalized score=" << score/votedPose->weightDenominator << " with denominator: " << votedPose->weightDenominator << std::endl;
57 
58  return;
59  }
60 
61 };
62 }
const double maxAngleDeviation
Definition: BaseRater.hpp:85
bool isVoteSupportingReference(VotedPosePtr &votedPose, PosePtr &refPose, RatingDataPtr data)
Definition: BaseRater.hpp:46
virtual void printRatingAtBackProjectionLevel(VotedPosePtr &votedPose, PosePtr &refPose, RatingDataPtr data)
Definition: SimpleRater.hpp:42
boost::shared_ptr< RatingData > RatingDataPtr
Definition: RatingData.hpp:38
virtual double rateAtBackProjectionLevel(VotedPosePtr &votedPose, RatingDataPtr data)
Definition: SimpleRater.hpp:34
boost::shared_ptr< VotedPose > VotedPosePtr
Definition: typedef.hpp:31
SimpleRater(double bin_size, double maxAngleDeviation)
Definition: SimpleRater.hpp:29
boost::shared_ptr< Pose > PosePtr
Definition: Pose.hpp:79
this namespace contains all generally usable classes.


asr_lib_ism
Author(s): Hanselmann Fabian, Heller Florian, Heizmann Heinrich, Kübler Marcel, Mehlhaus Jonas, Meißner Pascal, Qattan Mohamad, Reckling Reno, Stroh Daniel
autogenerated on Wed Jan 8 2020 04:02:41