Public Member Functions | List of all members
tuw_graph::Serializer Class Reference

#include <serializer.h>

Inheritance diagram for tuw_graph::Serializer:
Inheritance graph
[legend]

Public Member Functions

size_t getHash (const std::vector< signed char > &_map, const std::vector< double > &_parameters) const
 generate a hash from a _map More...
 
bool load (const std::string &_mapPath, std::vector< Segment > &_segs, Eigen::Vector2d &_origin, float &_resolution)
 loads a graph from memory which is saved in plain text More...
 
bool load (const std::string &_mapPath, std::vector< Segment > &_segs, Eigen::Vector2d &_origin, float &_resolution, cv::Mat &_map)
 loads a graph from memory which is saved in plain text More...
 
void save (const std::string &_mapPath, const std::vector< Segment > &_segs, const Eigen::Vector2d &_origin, const float &_resolution)
 saves the graph to a specific path in xml format More...
 
void save (const std::string &_mapPath, const std::vector< Segment > &_segs, const Eigen::Vector2d &_origin, const float &_resolution, const cv::Mat &_map)
 saves the graph to a specific path in xml format More...
 
 Serializer ()
 

Detailed Description

Definition at line 217 of file serializer.h.

Constructor & Destructor Documentation

◆ Serializer()

tuw_graph::Serializer::Serializer ( )

Definition at line 22 of file serializer.cpp.

Member Function Documentation

◆ getHash()

std::size_t tuw_graph::Serializer::getHash ( const std::vector< signed char > &  _map,
const std::vector< double > &  _parameters 
) const

generate a hash from a _map

Parameters
_mapthe map data used for the hash
_parametersparameters to check for changes

Definition at line 27 of file serializer.cpp.

◆ load() [1/2]

bool tuw_graph::Serializer::load ( const std::string &  _mapPath,
std::vector< Segment > &  _segs,
Eigen::Vector2d &  _origin,
float &  _resolution 
)

loads a graph from memory which is saved in plain text

Parameters
_mapPaththe save path of the graph
_segsthe segments generated Segments for the graph
_originthe origin of the graph
_resolutionthe resolution of the graph

Definition at line 45 of file serializer.cpp.

◆ load() [2/2]

bool tuw_graph::Serializer::load ( const std::string &  _mapPath,
std::vector< Segment > &  _segs,
Eigen::Vector2d &  _origin,
float &  _resolution,
cv::Mat &  _map 
)

loads a graph from memory which is saved in plain text

Parameters
_mapPaththe save path of the graph
_segsthe segments generated Segments for the graph
_originthe origin of the graph
_resolutionthe resolution of the graph
_mapmap on which the graph is based

Definition at line 142 of file serializer.cpp.

◆ save() [1/2]

void tuw_graph::Serializer::save ( const std::string &  _mapPath,
const std::vector< Segment > &  _segs,
const Eigen::Vector2d &  _origin,
const float &  _resolution 
)

saves the graph to a specific path in xml format

saves the map in the given location

Parameters
_mapPaththe save path of the graph
_segsthe segments generated Segments for the graph
_originthe origin of the graph
_resolutionthe resolution of the graph
mapInfothe name of the mapInfo file

Definition at line 155 of file serializer.cpp.

◆ save() [2/2]

void tuw_graph::Serializer::save ( const std::string &  _mapPath,
const std::vector< Segment > &  _segs,
const Eigen::Vector2d &  _origin,
const float &  _resolution,
const cv::Mat &  _map 
)

saves the graph to a specific path in xml format

Parameters
_mapPaththe save path of the graph
_segsthe segments generated Segments for the graph
_originthe origin of the graph
_resolutionthe resolution of the graph
_mapmap on which the graph is based

Definition at line 193 of file serializer.cpp.


The documentation for this class was generated from the following files:


tuw_voronoi_graph
Author(s): Benjamin Binder
autogenerated on Wed Mar 2 2022 01:10:12