Main MRPT website > C++ reference for MRPT 1.9.9
List of all members | Public Member Functions | Public Attributes | Private Attributes | Friends
mrpt::graphs::detail::THypothesis< GRAPH_T > Struct Template Reference

Detailed Description

template<class GRAPH_T>
struct mrpt::graphs::detail::THypothesis< GRAPH_T >

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.

See also
mrpt::deciders::CLoopCloserERD

Definition at line 37 of file THypothesis.h.

#include <mrpt/graphs/THypothesis.h>

Public Types

typedef GRAPH_T::constraint_t constraint_t
 Handy typedefs. More...
 
typedef constraint_t::type_value pose_t
 type of underlying poses (2D/3D). More...
 
typedef THypothesis< GRAPH_T > self_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::utils::TNodeID from, const mrpt::utils::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::utils::TNodeID from
 Starting node of the hypothesis. More...
 
mrpt::utils::TNodeID to
 Ending node of the hypothesis. More...
 
bool is_valid
 Field that specifies if the hypothesis is to be considered. More...
 
double goodness
 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)
 

Member Typedef Documentation

◆ constraint_t

template<class GRAPH_T>
typedef GRAPH_T::constraint_t mrpt::graphs::detail::THypothesis< GRAPH_T >::constraint_t

Handy typedefs.

type of graph constraints

Definition at line 42 of file THypothesis.h.

◆ pose_t

template<class GRAPH_T>
typedef constraint_t::type_value mrpt::graphs::detail::THypothesis< GRAPH_T >::pose_t

type of underlying poses (2D/3D).

Definition at line 44 of file THypothesis.h.

◆ self_t

template<class GRAPH_T>
typedef THypothesis<GRAPH_T> mrpt::graphs::detail::THypothesis< GRAPH_T >::self_t

Definition at line 45 of file THypothesis.h.

Constructor & Destructor Documentation

◆ THypothesis()

template<class GRAPH_T >
mrpt::graphs::detail::THypothesis< GRAPH_T >::THypothesis ( )

Constructor.

Definition at line 21 of file THypothesis_impl.h.

◆ ~THypothesis()

template<class GRAPH_T >
mrpt::graphs::detail::THypothesis< GRAPH_T >::~THypothesis ( )

Destructor.

Definition at line 26 of file THypothesis_impl.h.

Member Function Documentation

◆ getAsString() [1/2]

template<class GRAPH_T >
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 31 of file THypothesis_impl.h.

Referenced by mrpt::graphslam::deciders::CLoopCloserERD< GRAPH_T >::generateHypotsPool().

Here is the caller graph for this function:

◆ getAsString() [2/2]

template<class GRAPH_T >
void mrpt::graphs::detail::THypothesis< GRAPH_T >::getAsString ( std::string str,
bool  oneline = true 
) const

Definition at line 39 of file THypothesis_impl.h.

References ASSERTMSG_.

◆ getEdge() [1/2]

template<class GRAPH_T >
void mrpt::graphs::detail::THypothesis< GRAPH_T >::getEdge ( constraint_t edge) const

Getter methods for the underlying edge.

See also
setEdge

Definition at line 80 of file THypothesis_impl.h.

References ASSERT_.

Referenced by mrpt::graphslam::deciders::CLoopCloserERD< GRAPH_T >::generatePWConsistencyElement(), and mrpt::graphslam::deciders::CLoopCloserERD< GRAPH_T >::registerHypothesis().

Here is the caller graph for this function:

◆ getEdge() [2/2]

template<class GRAPH_T >
GRAPH_T::constraint_t mrpt::graphs::detail::THypothesis< GRAPH_T >::getEdge ( ) const

Definition at line 87 of file THypothesis_impl.h.

◆ getInverseEdge() [1/2]

template<class GRAPH_T >
void mrpt::graphs::detail::THypothesis< GRAPH_T >::getInverseEdge ( constraint_t edge) const

Getter methods for the inverse of the underlying edge.

Definition at line 99 of file THypothesis_impl.h.

References ASSERT_.

Referenced by mrpt::graphslam::deciders::CLoopCloserERD< GRAPH_T >::generatePWConsistencyElement().

Here is the caller graph for this function:

◆ getInverseEdge() [2/2]

template<class GRAPH_T >
GRAPH_T::constraint_t mrpt::graphs::detail::THypothesis< GRAPH_T >::getInverseEdge ( ) const

Definition at line 106 of file THypothesis_impl.h.

◆ hasEnds()

template<class GRAPH_T >
bool mrpt::graphs::detail::THypothesis< GRAPH_T >::hasEnds ( const mrpt::utils::TNodeID  from,
const mrpt::utils::TNodeID  to 
) const

Check if the start, end nodes are the ones given.

Returns
True if ends are the given ones

Definition at line 73 of file THypothesis_impl.h.

◆ inverseHypothesis()

template<class GRAPH_T >
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 115 of file THypothesis_impl.h.

◆ operator<()

template<class GRAPH_T >
bool mrpt::graphs::detail::THypothesis< GRAPH_T >::operator< ( const self_t other) const

Handy operator for using THypothesis in std::set.

Definition at line 128 of file THypothesis_impl.h.

References mrpt::graphs::detail::THypothesis< GRAPH_T >::id.

◆ sameEndsWith()

template<class GRAPH_T >
bool mrpt::graphs::detail::THypothesis< GRAPH_T >::sameEndsWith ( const self_t other) const

Compare the start and end nodes of two hypothesis.

Returns
True if ends match.

Definition at line 67 of file THypothesis_impl.h.

References mrpt::graphs::detail::THypothesis< GRAPH_T >::from, and mrpt::graphs::detail::THypothesis< GRAPH_T >::to.

◆ setEdge()

template<class GRAPH_T >
void mrpt::graphs::detail::THypothesis< GRAPH_T >::setEdge ( const constraint_t edge)

Setter method for the underlying edge.

See also
getEdge

Definition at line 93 of file THypothesis_impl.h.

Referenced by mrpt::graphslam::deciders::CLoopCloserERD< GRAPH_T >::generateHypotsPool().

Here is the caller graph for this function:

Friends And Related Function Documentation

◆ operator<<

template<class GRAPH_T>
std::ostream& operator<< ( std::ostream &  o,
const THypothesis< GRAPH_T > &  h 
)
friend

Definition at line 120 of file THypothesis.h.

Member Data Documentation

◆ edge

template<class GRAPH_T>
constraint_t mrpt::graphs::detail::THypothesis< GRAPH_T >::edge
private

Edge connecting the two nodes.

Definition at line 129 of file THypothesis.h.

◆ from

template<class GRAPH_T>
mrpt::utils::TNodeID mrpt::graphs::detail::THypothesis< GRAPH_T >::from

◆ goodness

template<class GRAPH_T>
double mrpt::graphs::detail::THypothesis< GRAPH_T >::goodness

Goodness value corresponding to the hypothesis edge.

Note
For ICP edges this resolves to the CICP goodness measure for the alignment operation.
See also
edge, mrpt::slam::CICP::goodness

Definition at line 103 of file THypothesis.h.

Referenced by mrpt::graphslam::deciders::CLoopCloserERD< GRAPH_T >::generateHypotsPool().

◆ id

template<class GRAPH_T>
size_t mrpt::graphs::detail::THypothesis< GRAPH_T >::id

◆ is_valid

template<class GRAPH_T>
bool mrpt::graphs::detail::THypothesis< GRAPH_T >::is_valid

◆ to

template<class GRAPH_T>
mrpt::utils::TNodeID mrpt::graphs::detail::THypothesis< GRAPH_T >::to



Page generated by Doxygen 1.8.14 for MRPT 1.9.9 Git: ae4571287 Thu Nov 23 00:06:53 2017 +0100 at dom oct 27 23:51:55 CET 2019