struct mrpt::maps::CRandomFieldGridMap2D::ConnectivityDescriptor

Base class for user-supplied objects capable of describing cells connectivity, used to build prior factors of the MRF graph.

See also:

setCellsConnectivity()

#include <mrpt/maps/CRandomFieldGridMap2D.h>

struct ConnectivityDescriptor
{
    // typedefs

    typedef std::shared_ptr<ConnectivityDescriptor> Ptr;

    //
methods

    virtual bool getEdgeInformation(
        const CRandomFieldGridMap2D* parent,
        size_t icx,
        size_t icy,
        size_t jcx,
        size_t jcy,
        double& out_edge_information
        ) = 0;
};

Methods

virtual bool getEdgeInformation(
    const CRandomFieldGridMap2D* parent,
    size_t icx,
    size_t icy,
    size_t jcx,
    size_t jcy,
    double& out_edge_information
    ) = 0

Implement the check of whether node i=(icx,icy) is connected with node j=(jcx,jcy).

This visitor method will be called only for immediate neighbors.

Returns:

true if connected (and the “information” value should be also updated in out_edge_information), false otherwise.