Hypothesis.h
Go to the documentation of this file.
1 
60 #ifndef HYPOTHESIS_H_
61 #define HYPOTHESIS_H_
62 
63 #include <string>
64 #include <list>
65 
66 namespace mhf {
67 
68 class AssignmentSet;
69 class SemanticObject;
70 class Assignment;
71 class ProbabilityModel;
72 class AssignmentMatrix;
73 
74 class Hypothesis {
75 
76 public:
77  /* CONSTRUCTORS / DESTRUCTORS */
78 
79  // Constructor
80  Hypothesis(const double& global_timestamp, double probability = -1);
81 
82  // Destructor
83  virtual ~Hypothesis();
84 
85  Hypothesis* clone() const;
86 
87 
88  /* GETTERS */
89 
90  const AssignmentSet* getAssignments() const;
91 
92  const Hypothesis* getBestLeaf() const;
93 
94  std::list<Hypothesis*>& getChildHypotheses();
95 
96  int getHeight() const;
97 
98  // returns the number of objects in the hypothesis
99  int getNumObjects() const;
100 
101  // returns the list of objects contained in this hypothesis
102  const std::list<SemanticObject*>& getObjects() const;
103 
104  //double getObjectProbability(MHTObject* obj) const;
105 
106  const Hypothesis* getParent() const;
107 
108  // returns probability of this hypothesis
109  double getProbability() const;
110 
111  double getTimestamp() const;
112 
114 
115  /* SETTERS */
116 
117  void setAssignments(AssignmentSet* assignments);
118 
119  void setInactive();
120 
121  void setProbability(double prob);
122 
123  //void setObjectProbability(MHTObject* obj, double p);
124 
125  /* HYPOTHESIS MODIFIERS */
126 
128 
129  // Add object to the object list
130  void addObject(SemanticObject* obj);
131 
132  void clearAssignmentSet();
133 
134  void clear();
135 
136  void addPotentialAssignment(Assignment* assignment);
137 
138  void applyAssignments();
139 
140  /* TREE UPDATE METHODS */
141 
142  void findActiveLeafs(std::list<Hypothesis*>& active_leafs);
143 
145 
146  int calculateHeigth();
147 
149 
150 
151  /* TREE CLEAR / DELETE METHODS */
152 
153  void clearInactive();
154 
155  void deleteChildren();
156 
158 
159 protected:
160 
161  double probability_;
162 
163  double timestamp_;
164 
165  std::list<SemanticObject*> objects_;
166 
168 
169  std::list<Hypothesis*> children_;
170 
172 
174 
176 
177  int height_;
178 
180 
181 };
182 
183 }
184 #endif /* HYPOTHESIS_H_ */
AssignmentMatrix * getAssignmentMatrix() const
Definition: Hypothesis.cpp:78
Hypothesis * determineBestLeaf()
Definition: Hypothesis.cpp:212
bool is_active_leaf_
Definition: Hypothesis.h:179
AssignmentMatrix * assignment_matrix_
Definition: Hypothesis.h:173
const Hypothesis * getBestLeaf() const
Definition: Hypothesis.cpp:43
double getTimestamp() const
Definition: Hypothesis.cpp:74
void clearAssignmentSet()
Definition: Hypothesis.cpp:120
double getProbability() const
Definition: Hypothesis.cpp:69
void setAssignments(AssignmentSet *assignments)
Definition: Hypothesis.cpp:87
double timestamp_
Definition: Hypothesis.h:163
virtual ~Hypothesis()
Definition: Hypothesis.cpp:29
Hypothesis(const double &global_timestamp, double probability=-1)
Definition: Hypothesis.cpp:25
Hypothesis * parent_
Definition: Hypothesis.h:167
std::list< Hypothesis * > children_
Definition: Hypothesis.h:169
int getHeight() const
Definition: Hypothesis.cpp:52
void addObject(SemanticObject *obj)
Definition: Hypothesis.cpp:114
Hypothesis * best_leaf_
Definition: Hypothesis.h:175
void applyAssignments()
Definition: Hypothesis.cpp:132
const AssignmentSet * getAssignments() const
Definition: Hypothesis.cpp:39
double calculateBranchProbabilities()
Definition: Hypothesis.cpp:189
int getNumObjects() const
Definition: Hypothesis.cpp:56
void deleteChildren()
Definition: Hypothesis.cpp:277
AssignmentSet * assignment_set_
Definition: Hypothesis.h:171
void findActiveLeafs(std::list< Hypothesis * > &active_leafs)
Definition: Hypothesis.cpp:228
double probability_
Definition: Hypothesis.h:161
Hypothesis * deleteSinglePaths()
Definition: Hypothesis.cpp:286
void setProbability(double prob)
Definition: Hypothesis.cpp:99
Hypothesis * clone() const
void addPotentialAssignment(Assignment *assignment)
Definition: Hypothesis.cpp:125
std::list< Hypothesis * > & getChildHypotheses()
Definition: Hypothesis.cpp:48
const std::list< SemanticObject * > & getObjects() const
Definition: Hypothesis.cpp:60
void addChildHypothesis(Hypothesis *h)
Definition: Hypothesis.cpp:108
const Hypothesis * getParent() const
Definition: Hypothesis.cpp:65
void clearInactive()
Definition: Hypothesis.cpp:267
void setInactive()
Definition: Hypothesis.cpp:95
Definition: ClassModel.h:44
std::list< SemanticObject * > objects_
Definition: Hypothesis.h:165


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