Go to the documentation of this file.
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 out_edge->copyFrom(edge);
86 template <
class GRAPH_T>
92 template <
class GRAPH_T>
95 edge.copyFrom(in_edge);
98 template <
class GRAPH_T>
102 edge.inverse(*out_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;
void setEdge(const constraint_t &edge)
Setter method for the underlying edge.
constraint_t getInverseEdge() const
bool hasEnds(const mrpt::graphs::TNodeID from, const mrpt::graphs::TNodeID to) const
Check if the start, end nodes are the ones given.
uint64_t TNodeID
A generic numeric type for unique IDs of nodes or entities.
An edge hypothesis between two nodeIDs.
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
#define ASSERT_(f)
Defines an assertion mechanism.
std::string getAsString(bool oneline=true) const
Return a string representation of the object at hand.
bool sameEndsWith(const self_t &other) const
Compare the start and end nodes of two hypothesis.
size_t id
ID of the current hypothesis.
~THypothesis()
Destructor.
bool operator<(const self_t &other) const
Handy operator for using THypothesis in std::set.
THypothesis()
Constructor.
mrpt::graphs::TNodeID to
Ending node of the hypothesis.
mrpt::graphs::TNodeID from
Starting node of the hypothesis.
#define ASSERTMSG_(f, __ERROR_MSG)
Defines an assertion mechanism.
void inverseHypothesis()
Reverse the hypothesis.
constraint_t getEdge() const
GLsizei const GLchar ** string
typename GRAPH_T::constraint_t constraint_t
Handy typedefs.
Page generated by Doxygen 1.8.17 for MRPT 1.9.9 Git: ad3a9d8ae Tue May 1 23:10:22 2018 -0700 at miƩ 12 jul 2023 10:03:34 CEST | |