struct mrpt::maps::TMetricMapInitializer

Virtual base for specifying the kind and parameters of one map (normally, to be inserted into mrpt::maps::CMultiMetricMap) See mrpt::maps::TSetOfMetricMapInitializers::loadFromConfigFile() as an easy way of initialize this object, or construct with the factory methods MetricMapClass::MapDefinition() and TMetricMapInitializer::factory()

See also:

TSetOfMetricMapInitializers, mrpt::maps::CMultiMetricMap

#include <mrpt/maps/TMetricMapInitializer.h>

struct TMetricMapInitializer: public mrpt::config::CLoadableOptions
{
    // typedefs

    typedef std::shared_ptr<TMetricMapInitializer> Ptr;

    //
fields

    mrpt::maps::TMapGenericParams genericMapParams;

    //
methods

    virtual void loadFromConfigFile(const mrpt::config::CConfigFileBase& source, const std::string& sectionNamePrefix);
    virtual void saveToConfigFile(mrpt::config::CConfigFileBase& target, const std::string& section) const;
    virtual void dumpToTextStream(std::ostream& out) const;
    const mrpt::rtti::TRuntimeClassId::Ptr& getMetricMapClassType() const;
    static Ptr factory(const std::string& mapClassName);
};

Inherited Members

public:
    //
methods

    virtual void loadFromConfigFile(const mrpt::config::CConfigFileBase& source, const std::string& section) = 0;
    void loadFromConfigFileName(const std::string& config_file, const std::string& section);
    virtual void saveToConfigFile(mrpt::config::CConfigFileBase& target, const std::string& section) const;
    void saveToConfigFileName(const std::string& config_file, const std::string& section) const;
    void dumpToConsole() const;
    virtual void dumpToTextStream(std::ostream& out) const;

Typedefs

typedef std::shared_ptr<TMetricMapInitializer> Ptr

Smart pointer to TMetricMapInitializer.

Fields

mrpt::maps::TMapGenericParams genericMapParams

Common params for all maps: These are automatically set in TMetricMapTypesRegistry::factoryMapObjectFromDefinition()

Methods

virtual void loadFromConfigFile(
    const mrpt::config::CConfigFileBase& source,
    const std::string& sectionNamePrefix
    )

Load all params from a config file/source.

For examples and format, read the docs of mrpt::maps::CMultiMetricMap Typical section names:

  • <sectionNamePrefix>_creationOpts

  • <sectionNamePrefix>_insertOpts

  • <sectionNamePrefix>_likelihoodOpts

For examples and format, read the docs of mrpt::maps::CMultiMetricMap

virtual void saveToConfigFile(mrpt::config::CConfigFileBase& target, const std::string& section) const

This method saves the options to a “.ini”-like file or memory-stored string list.

See also:

loadFromConfigFile, saveToConfigFileName

virtual void dumpToTextStream(std::ostream& out) const

This method should clearly display all the contents of the structure in textual form, sending it to a std::ostream.

The default implementation in this base class relies on saveToConfigFile() to generate a plain text representation of all the parameters.

const mrpt::rtti::TRuntimeClassId::Ptr& getMetricMapClassType() const

Query the map type (C++ class), as set by the factory method MapDefinition()

static Ptr factory(const std::string& mapClassName)

Looks up in the registry of known map types and call the corresponding <metric_map_class>::MapDefinition().