unstable/slam/serialization.h
Go to the documentation of this file.
1 
10 #pragma once
11 
13 
14 namespace gtsam {
15 
16 // Serialize/Deserialize a NonlinearFactorGraph
17 std::string serializeGraph(const NonlinearFactorGraph& graph);
18 
19 NonlinearFactorGraph::shared_ptr deserializeGraph(const std::string& serialized_graph);
20 
21 std::string serializeGraphXML(const NonlinearFactorGraph& graph,
22  const std::string& name = "graph");
23 
24 NonlinearFactorGraph::shared_ptr deserializeGraphXML(const std::string& serialized_graph,
25  const std::string& name = "graph");
26 
27 
28 // Serialize/Deserialize a Values
29 std::string serializeValues(const Values& values);
30 
31 Values::shared_ptr deserializeValues(const std::string& serialized_values);
32 
33 std::string serializeValuesXML(const Values& values, const std::string& name = "values");
34 
35 Values::shared_ptr deserializeValuesXML(const std::string& serialized_values,
36  const std::string& name = "values");
37 
38 // Serialize to/from files
39 // serialize functions return true if successful
40 // Filename arguments include path
41 
42 // Serialize
43 bool serializeGraphToFile(const NonlinearFactorGraph& graph, const std::string& fname);
44 bool serializeGraphToXMLFile(const NonlinearFactorGraph& graph,
45  const std::string& fname, const std::string& name = "graph");
46 
47 bool serializeValuesToFile(const Values& values, const std::string& fname);
49  const std::string& fname, const std::string& name = "values");
50 
51 // Deserialize
54  const std::string& name = "graph");
55 
56 Values::shared_ptr deserializeValuesFromFile(const std::string& fname);
57 Values::shared_ptr deserializeValuesFromXMLFile(const std::string& fname,
58  const std::string& name = "values");
59 
60 } // \namespace gtsam
61 
62 
NonlinearFactorGraph::shared_ptr deserializeGraphFromXMLFile(const std::string &fname, const std::string &name="graph")
Values::shared_ptr deserializeValuesFromXMLFile(const std::string &fname, const std::string &name="values")
Factor Graph consisting of non-linear factors.
NonlinearFactorGraph::shared_ptr deserializeGraph(const std::string &serialized_graph)
leaf::MyValues values
Values::shared_ptr deserializeValues(const std::string &serialized_values)
NonlinearFactorGraph graph
bool serializeGraphToFile(const NonlinearFactorGraph &graph, const std::string &fname)
bool serializeGraphToXMLFile(const NonlinearFactorGraph &graph, const std::string &fname, const std::string &name="graph")
Values::shared_ptr deserializeValuesXML(const std::string &serialized_values, const std::string &name="values")
boost::shared_ptr< This > shared_ptr
Values::shared_ptr deserializeValuesFromFile(const std::string &fname)
boost::shared_ptr< Values > shared_ptr
A shared_ptr to this class.
Definition: Values.h:96
std::string serializeGraph(const NonlinearFactorGraph &graph)
traits
Definition: chartTesting.h:28
std::string serializeGraphXML(const NonlinearFactorGraph &graph, const std::string &name="graph")
std::vector< float > Values
NonlinearFactorGraph::shared_ptr deserializeGraphXML(const std::string &serialized_graph, const std::string &name="graph")
NonlinearFactorGraph::shared_ptr deserializeGraphFromFile(const std::string &fname)
std::string serializeValues(const Values &values)
std::string serializeValuesXML(const Values &values, const std::string &name="values")
Annotation for function names.
Definition: attr.h:36
bool serializeValuesToXMLFile(const Values &values, const std::string &fname, const std::string &name="values")
bool serializeValuesToFile(const Values &values, const std::string &fname)


gtsam
Author(s):
autogenerated on Sat May 8 2021 02:44:01