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 
std::string serializeGraph(const NonlinearFactorGraph &graph)
NonlinearFactorGraph::shared_ptr deserializeGraph(const std::string &serialized_graph)
Factor Graph consisting of non-linear factors.
leaf::MyValues values
Values::shared_ptr deserializeValuesFromFile(const std::string &fname)
NonlinearFactorGraph::shared_ptr deserializeGraphFromXMLFile(const std::string &fname, const std::string &name="graph")
NonlinearFactorGraph graph
std::string serializeValuesXML(const Values &values, const std::string &name="values")
Values::shared_ptr deserializeValuesXML(const std::string &serialized_values, const std::string &name="values")
Values::shared_ptr deserializeValues(const std::string &serialized_values)
NonlinearFactorGraph::shared_ptr deserializeGraphFromFile(const std::string &fname)
traits
Definition: chartTesting.h:28
bool serializeGraphToXMLFile(const NonlinearFactorGraph &graph, const std::string &fname, const std::string &name="graph")
std::string serializeGraphXML(const NonlinearFactorGraph &graph, const std::string &name="graph")
bool serializeGraphToFile(const NonlinearFactorGraph &graph, const std::string &fname)
std::shared_ptr< This > shared_ptr
Values::shared_ptr deserializeValuesFromXMLFile(const std::string &fname, const std::string &name="values")
std::string serializeValues(const Values &values)
bool serializeValuesToFile(const Values &values, const std::string &fname)
Annotation for function names.
Definition: attr.h:48
NonlinearFactorGraph::shared_ptr deserializeGraphXML(const std::string &serialized_graph, const std::string &name="graph")
std::shared_ptr< Values > shared_ptr
A shared_ptr to this class.
Definition: Values.h:84
bool serializeValuesToXMLFile(const Values &values, const std::string &fname, const std::string &name="values")


gtsam
Author(s):
autogenerated on Tue Jul 4 2023 02:35:42