1 #ifndef THYPOTHESIS_IMPL_H 2 #define THYPOTHESIS_IMPL_H 6 namespace mrpt {
namespace graphs {
namespace detail {
8 template<
class GRAPH_T>
13 template<
class GRAPH_T>
17 template<
class GRAPH_T>
25 template<
class GRAPH_T>
29 ASSERTMSG_(str,
"Given string pointer is not valid");
35 ss <<
"Hypothesis #" <<
id << endl;
36 ss <<
from <<
" => " <<
to << endl;
40 ss <<
"Hypothesis #" <<
id <<
"| ";
41 ss <<
from <<
" => " <<
to <<
"| ";
42 ss <<
edge.getMeanVal().asString();
51 template<
class GRAPH_T>
53 const self_t& other)
const {
54 return (this->
from == other.
from && this->to == other.
to);
57 template<
class GRAPH_T>
61 return (this->
from == from_in && this->
to == to_in);
64 template<
class GRAPH_T>
67 edge->copyFrom(this->edge);
70 template<
class GRAPH_T>
71 typename GRAPH_T::constraint_t
77 template<
class GRAPH_T>
79 this->edge.copyFrom(edge);
82 template<
class GRAPH_T>
85 this->edge.inverse(*edge);
88 template<
class GRAPH_T>
89 typename GRAPH_T::constraint_t
97 template<
class GRAPH_T>
106 this->
edge.copyFrom(edge_tmp);
109 template<
class GRAPH_T>
111 return this->
id < other.
id;
double goodness
Goodness value corresponding to the hypothesis edge.
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.
bool is_valid
Field that specifies if the hypothesis is to be considered.
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.
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.
constraint_t edge
Edge connecting the two nodes.
bool is_valid(const expression< T > &expr)
std::string getAsString(bool oneline=true) const
Return a string representation of the object at hand.