Turi Create  4.0
sgraph_io.hpp
1 /* Copyright © 2017 Apple Inc. All rights reserved.
2  *
3  * Use of this source code is governed by a BSD-3-clause license that can
4  * be found in the LICENSE.txt file or at https://opensource.org/licenses/BSD-3-Clause
5  */
6 #ifndef TURI_SGRAPH_IO_HPP
7 #define TURI_SGRAPH_IO_HPP
8 
9 #include<string>
10 
11 class sgraph;
12 
13 namespace turi {
14 
15 /**
16  * \ingroup sgraph_physical
17  * \addtogroup sgraph_main Main SGraph Objects
18  * \{
19  */
20 
21  /**
22  * Write the content of the graph into a json file.
23  */
24  void save_sgraph_to_json(const sgraph& g,
25  std::string targetfile);
26 
27  /**
28  * Write the content of the graph into a collection csv files under target directory.
29  * The vertex data are saved to vertex-groupid-partitionid.csv and edge data
30  * are saved to edge-groupid-partitionid.csv.
31  */
32  void save_sgraph_to_csv(const sgraph& g,
33  std::string targetdir);
34 
35 /// \}
36 }
37 
38 #endif
void save_sgraph_to_json(const sgraph &g, std::string targetfile)
void save_sgraph_to_csv(const sgraph &g, std::string targetdir)