gtsam  4.1.0
gtsam
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);
48 bool serializeValuesToXMLFile(const Values& values,
49  const std::string& fname, const std::string& name = "values");
50 
51 // Deserialize
52 NonlinearFactorGraph::shared_ptr deserializeGraphFromFile(const std::string& fname);
53 NonlinearFactorGraph::shared_ptr deserializeGraphFromXMLFile(const std::string& fname,
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 
gtsam::Values::shared_ptr
boost::shared_ptr< Values > shared_ptr
A shared_ptr to this class.
Definition: Values.h:96
NonlinearFactorGraph.h
Factor Graph Constsiting of non-linear factors.
gtsam
Global functions in a separate testing namespace.
Definition: chartTesting.h:28