9 #ifndef THYPOTHESIS_IMPL_H 10 #define THYPOTHESIS_IMPL_H 20 template <
class GRAPH_T>
25 template <
class GRAPH_T>
30 template <
class GRAPH_T>
34 this->getAsString(&str, oneline);
38 template <
class GRAPH_T>
42 ASSERTMSG_(str,
"Given string pointer is not valid");
49 ss <<
"Hypothesis #" <<
id << endl;
50 ss << from <<
" => " << to << endl;
55 ss <<
"Hypothesis #" <<
id <<
"| ";
56 ss << from <<
" => " << to <<
"| ";
57 ss << edge.getMeanVal().asString();
58 ss <<
"|goodness: " << goodness;
59 ss <<
"|valid: " << is_valid;
66 template <
class GRAPH_T>
69 return (this->from == other.
from && this->to == other.
to);
72 template <
class GRAPH_T>
76 return (this->from == from_in && this->to == to_in);
79 template <
class GRAPH_T>
83 edge->copyFrom(this->edge);
86 template <
class GRAPH_T>
92 template <
class GRAPH_T>
95 this->edge.copyFrom(edge);
98 template <
class GRAPH_T>
102 this->edge.inverse(*edge);
105 template <
class GRAPH_T>
109 this->getInverseEdge(&inverse_edge);
114 template <
class GRAPH_T>
124 this->edge.copyFrom(edge_tmp);
127 template <
class GRAPH_T>
130 return this->
id < other.
id;
constraint_t getEdge() const
void inverseHypothesis()
Reverse the hypothesis.
GRAPH_T::constraint_t constraint_t
Handy typedefs.
mrpt::utils::TNodeID from
Starting node of the hypothesis.
uint64_t TNodeID
The type for node IDs in graphs of different types.
~THypothesis()
Destructor.
bool operator<(const self_t &other) const
Handy operator for using THypothesis in std::set.
THypothesis()
Constructor.
GLsizei const GLchar ** string
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
mrpt::utils::TNodeID to
Ending node of the hypothesis.
void setEdge(const constraint_t &edge)
Setter method for the underlying edge.
constraint_t getInverseEdge() const
size_t id
ID of the current hypothesis.
An edge hypothesis between two nodeIDs.
bool hasEnds(const mrpt::utils::TNodeID from, const mrpt::utils::TNodeID to) const
Check if the start, end nodes are the ones given.
#define ASSERTMSG_(f, __ERROR_MSG)
bool sameEndsWith(const self_t &other) const
Compare the start and end nodes of two hypothesis.
std::string getAsString(bool oneline=true) const
Return a string representation of the object at hand.