-
Notifications
You must be signed in to change notification settings - Fork 321
Expand file tree
/
Copy pathunity_graph_interface.hpp
More file actions
94 lines (83 loc) · 4.96 KB
/
unity_graph_interface.hpp
File metadata and controls
94 lines (83 loc) · 4.96 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
/**
* Copyright (C) 2016 Turi
* All rights reserved.
*
* This software may be modified and distributed under the terms
* of the BSD license. See the LICENSE file for details.
*/
#ifndef GRAPHLAB_UNITY_GRAPH_INTERFACE_HPP
#define GRAPHLAB_UNITY_GRAPH_INTERFACE_HPP
#include <memory>
#include <vector>
#include <string>
#include <flexible_type/flexible_type.hpp>
#include <unity/lib/options_map.hpp>
#include <unity/lib/api/unity_sframe_interface.hpp>
#include <cppipc/magic_macros.hpp>
namespace graphlab {
#if DOXYGEN_DOCUMENTATION
// Doxygen fake documentation
/**
* The \ref graphlab::unity_graph and \ref graphlab::unity_sgraph_base classes
* implement a graph object on the server side which is exposed to the
* client via the cppipc system. The unity_graph is a lazily evaluated, immutable
* graph datastructure where most operations do not take time, and instead,
* the graph is only fully constructed when accessed. See
* \ref graphlab::unity_graph for detailed documentation on the functions.
*/
class unity_sgraph_base {
options_map_t summary();
std::vector<std::string> get_fields();
std::shared_ptr<unity_sframe_base> get_vertices(const std::vector<flexible_type>&,
const options_map_t&);
std::shared_ptr<unity_sframe_base> get_edges(const std::vector<flexible_type>&
const std::vector<flexible_type>&
const options_map_t&);
bool save_graph(std::string)
bool load_graph(std::string)
std::shared_ptr<unity_sgraph_base> clone()
std::shared_ptr<unity_sgraph_base> add_vertices(dataframe_t&, const std::string&)
std::shared_ptr<unity_sgraph_base> add_vertices(unity_sframe&, const std::string&)
std::shared_ptr<unity_sgraph_base> add_vertices_from_file(const std::string&, const std::string&, char, bool)
std::shared_ptr<unity_sgraph_base> add_edges_from_file(const std::string&, const std::string&, const std::string&, char, bool)
std::shared_ptr<unity_sgraph_base> add_edges(dataframe_t&, const std::string&, const std::string&)
std::shared_ptr<unity_sgraph_base> select_fields(const std::vector<std::string>&)
std::shared_ptr<unity_sgraph_base> copy_field(std::string, std::string)
std::shared_ptr<unity_sgraph_base> delete_field(std::string)
}
#endif
GENERATE_INTERFACE_AND_PROXY_NO_INLINE_DESTRUCTOR(unity_sgraph_base, unity_graph_proxy,
(options_map_t, summary, )
(std::vector<std::string>, get_vertex_fields, (size_t))
(std::vector<std::string>, get_edge_fields, (size_t)(size_t))
(std::vector<flex_type_enum>, get_vertex_field_types, (size_t))
(std::vector<flex_type_enum>, get_edge_field_types, (size_t)(size_t))
(std::shared_ptr<unity_sframe_base>, get_vertices,
(const std::vector<flexible_type>&)(const options_map_t&)(size_t))
(std::shared_ptr<unity_sframe_base>, get_edges,
(const std::vector<flexible_type>&)
(const std::vector<flexible_type>&)
(const options_map_t&)(size_t)(size_t))
// (bool, save_graph_as_json, (std::string))
(bool, save_graph, (std::string)(std::string))
(bool, load_graph, (std::string))
(std::shared_ptr<unity_sgraph_base>, clone, )
(std::shared_ptr<unity_sgraph_base>, add_vertices, (std::shared_ptr<unity_sframe_base>)(const std::string&)(size_t))
(std::shared_ptr<unity_sgraph_base>, add_edges, (std::shared_ptr<unity_sframe_base>)(const std::string&)(const std::string&)(size_t)(size_t))
(std::shared_ptr<unity_sgraph_base>, select_vertex_fields, (const std::vector<std::string>&)(size_t))
(std::shared_ptr<unity_sgraph_base>, copy_vertex_field, (std::string)(std::string)(size_t))
(std::shared_ptr<unity_sgraph_base>, add_vertex_field, (std::shared_ptr<unity_sarray_base>)(std::string))
(std::shared_ptr<unity_sgraph_base>, delete_vertex_field, (std::string)(size_t))
(std::shared_ptr<unity_sgraph_base>, rename_vertex_fields, (const std::vector<std::string>&)(const std::vector<std::string>&))
(std::shared_ptr<unity_sgraph_base>, swap_vertex_fields, (const std::string&)(const std::string&))
(std::shared_ptr<unity_sgraph_base>, select_edge_fields, (const std::vector<std::string>&)(size_t)(size_t))
(std::shared_ptr<unity_sgraph_base>, add_edge_field, (std::shared_ptr<unity_sarray_base>)(std::string))
(std::shared_ptr<unity_sgraph_base>, copy_edge_field, (std::string)(std::string)(size_t)(size_t))
(std::shared_ptr<unity_sgraph_base>, delete_edge_field, (std::string)(size_t)(size_t))
(std::shared_ptr<unity_sgraph_base>, rename_edge_fields, (const std::vector<std::string>&)(const std::vector<std::string>&))
(std::shared_ptr<unity_sgraph_base>, swap_edge_fields, (const std::string&)(const std::string&))
(std::shared_ptr<unity_sgraph_base>, lambda_triple_apply, (const std::string&)(const std::vector<std::string>&))
(std::shared_ptr<unity_sgraph_base>, lambda_triple_apply_native, (const function_closure_info&)(const std::vector<std::string>&))
)
} // namespace graphlab
#endif // GRAPHLAB_UNITY_GRAPH_INTERFACE_HPP