HypothesesTree.h
Go to the documentation of this file.
1 
59 #ifndef HYPOTHESESTREE_H_
60 #define HYPOTHESESTREE_H_
61 
62 #include "wire/core/datatypes.h"
63 #include <list>
64 #include <map>
65 
66 namespace mhf {
67 
68 class Evidence;
69 class SemanticObject;
70 class Hypothesis;
71 class AssignmentMatrix;
72 class KnowledgeDatabase;
73 class EvidenceSet;
74 
76 
77 public:
78 
79  /* CONSTRUCTORS / DESTRUCTORS */
80 
81  // Constructor
82  HypothesisTree(int num_max_hyps, double max_min_prob_ratio);
83 
84  // Destructor
85  virtual ~HypothesisTree();
86 
87 
88  /* GETTERS */
89 
90  const std::list<SemanticObject*>& getMAPObjects() const;
91 
92  const std::list<SemanticObject*>& getAllObjects() const;
93 
94  const std::list<Hypothesis*>& getHypotheses() const;
95 
96  const Hypothesis& getMAPHypothesis() const;
97 
98  int getHeight() const;
99 
100 
101  /* SETTERS */
102 
103  void addEvidence(const EvidenceSet& ev_set);
104 
105 
106  /* PRINT METHODS */
107 
108  void showStatistics();
109 
110 protected:
111 
113 
114  std::list<Hypothesis*> leafs_;
115 
117 
119 
121 
123 
124  unsigned int num_max_hyps_;
125 
128 
129  void applyAssignments();
130 
131  //void determineMAPHypothesis();
132 
133  void expandTree(const EvidenceSet &ev_set);
134 
135  // Normalize the probabilities of all hypotheses in the tree
136  void normalizeProbabilities();
137 
138  // Prune the tree
139  void pruneTree(const Time& timestamp);
140 
141 };
142 
143 }
144 #endif /* HYPOTHESESTREE_H_ */
HypothesisTree(int num_max_hyps, double max_min_prob_ratio)
std::list< Hypothesis * > leafs_
Hypothesis * MAP_hypothesis_
double Time
Definition: datatypes.h:52
const std::list< SemanticObject * > & getAllObjects() const
void addEvidence(const EvidenceSet &ev_set)
const Hypothesis & getMAPHypothesis() const
void expandTree(const EvidenceSet &ev_set)
A set of Evidence items which all originate from the same point int time.
Definition: EvidenceSet.h:55
unsigned int num_max_hyps_
const std::list< SemanticObject * > & getMAPObjects() const
const std::list< Hypothesis * > & getHypotheses() const
void pruneTree(const Time &timestamp)
Definition: ClassModel.h:44


wire_core
Author(s): Sjoerd van den Dries, Jos Elfring
autogenerated on Fri Apr 16 2021 02:32:27