MRPT
2.0.4
|
An edge hypothesis between two nodeIDs.
Struct practically provides a wrapper around the GRAPH_T::constraint_t instance. Represents a hypothesis for a potential, perhaps loop closing, edge (i.e. a graph constraint/edge), between two nodeIDs of the graph.
Definition at line 32 of file THypothesis.h.
#include <mrpt/graphs/THypothesis.h>
Public Types | |
using | constraint_t = typename GRAPH_T::constraint_t |
Handy typedefs. More... | |
using | pose_t = typename constraint_t::type_value |
type of underlying poses (2D/3D). More... | |
using | self_t = THypothesis< GRAPH_T > |
Public Member Functions | |
THypothesis () | |
Constructor. More... | |
~THypothesis () | |
Destructor. More... | |
void | setEdge (const constraint_t &edge) |
Setter method for the underlying edge. More... | |
void | inverseHypothesis () |
Reverse the hypothesis. More... | |
bool | sameEndsWith (const self_t &other) const |
Compare the start and end nodes of two hypothesis. More... | |
bool | hasEnds (const mrpt::graphs::TNodeID from, const mrpt::graphs::TNodeID to) const |
Check if the start, end nodes are the ones given. More... | |
bool | operator< (const self_t &other) const |
Handy operator for using THypothesis in std::set. More... | |
std::string | getAsString (bool oneline=true) const |
Return a string representation of the object at hand. More... | |
void | getAsString (std::string *str, bool oneline=true) const |
void | getEdge (constraint_t *edge) const |
Getter methods for the underlying edge. More... | |
constraint_t | getEdge () const |
void | getInverseEdge (constraint_t *edge) const |
Getter methods for the inverse of the underlying edge. More... | |
constraint_t | getInverseEdge () const |
Public Attributes | |
size_t | id |
ID of the current hypothesis. More... | |
mrpt::graphs::TNodeID | from |
Starting node of the hypothesis. More... | |
mrpt::graphs::TNodeID | to |
Ending node of the hypothesis. More... | |
bool | is_valid {true} |
Field that specifies if the hypothesis is to be considered. More... | |
double | goodness {0} |
Goodness value corresponding to the hypothesis edge. More... | |
Private Attributes | |
constraint_t | edge |
Edge connecting the two nodes. More... | |
Friends | |
std::ostream & | operator<< (std::ostream &o, const THypothesis< GRAPH_T > &h) |
using mrpt::graphs::detail::THypothesis< GRAPH_T >::constraint_t = typename GRAPH_T::constraint_t |
using mrpt::graphs::detail::THypothesis< GRAPH_T >::pose_t = typename constraint_t::type_value |
type of underlying poses (2D/3D).
Definition at line 39 of file THypothesis.h.
using mrpt::graphs::detail::THypothesis< GRAPH_T >::self_t = THypothesis<GRAPH_T> |
Definition at line 40 of file THypothesis.h.
|
default |
Constructor.
|
default |
Destructor.
std::string mrpt::graphs::detail::THypothesis< GRAPH_T >::getAsString | ( | bool | oneline = true | ) | const |
Return a string representation of the object at hand.
Definition at line 22 of file THypothesis_impl.h.
void mrpt::graphs::detail::THypothesis< GRAPH_T >::getAsString | ( | std::string * | str, |
bool | oneline = true |
||
) | const |
Definition at line 30 of file THypothesis_impl.h.
References ASSERTMSG_.
void mrpt::graphs::detail::THypothesis< GRAPH_T >::getEdge | ( | constraint_t * | edge | ) | const |
Getter methods for the underlying edge.
Definition at line 71 of file THypothesis_impl.h.
References ASSERT_.
GRAPH_T::constraint_t mrpt::graphs::detail::THypothesis< GRAPH_T >::getEdge | ( | ) | const |
Definition at line 78 of file THypothesis_impl.h.
void mrpt::graphs::detail::THypothesis< GRAPH_T >::getInverseEdge | ( | constraint_t * | edge | ) | const |
Getter methods for the inverse of the underlying edge.
Definition at line 90 of file THypothesis_impl.h.
References ASSERT_.
GRAPH_T::constraint_t mrpt::graphs::detail::THypothesis< GRAPH_T >::getInverseEdge | ( | ) | const |
Definition at line 97 of file THypothesis_impl.h.
bool mrpt::graphs::detail::THypothesis< GRAPH_T >::hasEnds | ( | const mrpt::graphs::TNodeID | from, |
const mrpt::graphs::TNodeID | to | ||
) | const |
Check if the start, end nodes are the ones given.
Definition at line 64 of file THypothesis_impl.h.
void mrpt::graphs::detail::THypothesis< GRAPH_T >::inverseHypothesis | ( | ) |
Reverse the hypothesis.
Reversing implies, at least, changing order of from/to nodes and reversing the underlying edge
Definition at line 106 of file THypothesis_impl.h.
bool mrpt::graphs::detail::THypothesis< GRAPH_T >::operator< | ( | const self_t & | other | ) | const |
Handy operator for using THypothesis in std::set.
Definition at line 119 of file THypothesis_impl.h.
References mrpt::graphs::detail::THypothesis< GRAPH_T >::id.
bool mrpt::graphs::detail::THypothesis< GRAPH_T >::sameEndsWith | ( | const self_t & | other | ) | const |
Compare the start and end nodes of two hypothesis.
Definition at line 58 of file THypothesis_impl.h.
References mrpt::graphs::detail::THypothesis< GRAPH_T >::from, and mrpt::graphs::detail::THypothesis< GRAPH_T >::to.
void mrpt::graphs::detail::THypothesis< GRAPH_T >::setEdge | ( | const constraint_t & | edge | ) |
Setter method for the underlying edge.
Definition at line 84 of file THypothesis_impl.h.
|
friend |
Definition at line 115 of file THypothesis.h.
|
private |
Edge connecting the two nodes.
Definition at line 124 of file THypothesis.h.
mrpt::graphs::TNodeID mrpt::graphs::detail::THypothesis< GRAPH_T >::from |
Starting node of the hypothesis.
Definition at line 86 of file THypothesis.h.
Referenced by mrpt::graphs::detail::THypothesis< GRAPH_T >::sameEndsWith().
double mrpt::graphs::detail::THypothesis< GRAPH_T >::goodness {0} |
Goodness value corresponding to the hypothesis edge.
Definition at line 98 of file THypothesis.h.
size_t mrpt::graphs::detail::THypothesis< GRAPH_T >::id |
ID of the current hypothesis.
Definition at line 84 of file THypothesis.h.
Referenced by mrpt::graphs::detail::THypothesis< GRAPH_T >::operator<().
bool mrpt::graphs::detail::THypothesis< GRAPH_T >::is_valid {true} |
Field that specifies if the hypothesis is to be considered.
Definition at line 90 of file THypothesis.h.
mrpt::graphs::TNodeID mrpt::graphs::detail::THypothesis< GRAPH_T >::to |
Ending node of the hypothesis.
Definition at line 88 of file THypothesis.h.
Referenced by mrpt::graphs::detail::THypothesis< GRAPH_T >::sameEndsWith().
Page generated by Doxygen 1.8.14 for MRPT 2.0.4 Git: 33de1d0ad Sat Jun 20 11:02:42 2020 +0200 at sáb jun 20 17:35:17 CEST 2020 |