9 #ifndef THYPOTHESIS_IMPL_H 10 #define THYPOTHESIS_IMPL_H 16 template <
class GRAPH_T>
21 template <
class GRAPH_T>
26 template <
class GRAPH_T>
30 this->getAsString(&str, oneline);
34 template <
class GRAPH_T>
38 ASSERTMSG_(str,
"Given string pointer is not valid");
45 ss <<
"Hypothesis #" <<
id << endl;
46 ss << from <<
" => " << to << endl;
51 ss <<
"Hypothesis #" <<
id <<
"| ";
52 ss << from <<
" => " << to <<
"| ";
53 ss << edge.getMeanVal().asString();
54 ss <<
"|goodness: " << goodness;
55 ss <<
"|valid: " << is_valid;
62 template <
class GRAPH_T>
65 return (this->from == other.
from && this->to == other.
to);
68 template <
class GRAPH_T>
72 return (this->from == from_in && this->to == to_in);
75 template <
class GRAPH_T>
79 out_edge->copyFrom(edge);
82 template <
class GRAPH_T>
88 template <
class GRAPH_T>
91 edge.copyFrom(in_edge);
94 template <
class GRAPH_T>
98 edge.inverse(*out_edge);
101 template <
class GRAPH_T>
105 this->getInverseEdge(&inverse_edge);
110 template <
class GRAPH_T>
120 this->edge.copyFrom(edge_tmp);
123 template <
class GRAPH_T>
126 return this->
id < other.
id;
constraint_t getEdge() const
void inverseHypothesis()
Reverse the hypothesis.
typename GRAPH_T::constraint_t constraint_t
Handy typedefs.
#define ASSERT_(f)
Defines an assertion mechanism.
Internal functions for MRPT.
~THypothesis()
Destructor.
mrpt::graphs::TNodeID from
Starting node of the hypothesis.
bool operator<(const self_t &other) const
Handy operator for using THypothesis in std::set.
#define ASSERTMSG_(f, __ERROR_MSG)
Defines an assertion mechanism.
THypothesis()
Constructor.
bool hasEnds(const mrpt::graphs::TNodeID from, const mrpt::graphs::TNodeID to) const
Check if the start, end nodes are the ones given.
GLsizei const GLchar ** string
mrpt::graphs::TNodeID to
Ending node of the hypothesis.
void setEdge(const constraint_t &edge)
Setter method for the underlying edge.
uint64_t TNodeID
A generic numeric type for unique IDs of nodes or entities.
constraint_t getInverseEdge() const
size_t id
ID of the current hypothesis.
An edge hypothesis between two nodeIDs.
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.