17 #ifndef JUBATUS_CORE_GRAPH_GRAPH_TYPE_HPP_
18 #define JUBATUS_CORE_GRAPH_GRAPH_TYPE_HPP_
25 #include <msgpack.hpp>
26 #include "jubatus/util/data/unordered_map.h"
28 #include "../common/exception.hpp"
29 #include "../common/type.hpp"
30 #include "../common/unordered_map.hpp"
39 typedef std::map<std::string, std::string>
property;
52 typedef jubatus::util::data::unordered_map<node_id_t, eigen_vector_info>
73 std::vector<std::pair<std::string, std::string> >
edge_query;
74 std::vector<std::pair<std::string, std::string> >
node_query;
83 typedef jubatus::util::data::unordered_map<
94 typedef std::vector<shortest_path_tree>
spt_diff;
96 typedef jubatus::util::data::unordered_map<preset_query, eigen_vector_diff>
99 typedef jubatus::util::data::unordered_map<preset_query, spt_diff>
192 const std::vector<std::pair<std::string, std::string> >& q,
194 for (
size_t i = 0; i < q.size(); ++i) {
195 h = update(q[i].first, h);
196 h = update(q[i].second, h);
201 static uint64_t
update(
const std::string& s, uint64_t h) {
202 for (
size_t i = 0; i < s.size(); ++i) {
203 h *= 1099511628211LLU;
206 return h * 1099511628211LLU;
214 #endif // JUBATUS_CORE_GRAPH_GRAPH_TYPE_HPP_
MSGPACK_DEFINE(p, src, tgt)
jubatus::util::data::unordered_map< node_id_t, eigen_vector_info > eigen_vector_diff
std::vector< std::pair< std::string, std::string > > edge_query
jubatus::util::data::unordered_map< preset_query, eigen_vector_diff > eigen_vector_query_diff
edge_exists(edge_id_t id)
std::vector< std::pair< std::string, std::string > > node_query
MSGPACK_DEFINE(landmark, from_root, to_root)
global_node_exists(node_id_t id)
std::vector< edge_id_t > in_edges
jubatus::util::data::unordered_map< preset_query, spt_diff > spt_query_diff
unknown_query(const preset_query &q)
unknown_centrality_type(centrality_type t)
uint64_t operator()(const jubatus::core::graph::preset_query &p) const
static uint64_t update(const std::string &s, uint64_t h)
unknown_id(const std::string &type, uint64_t id)
std::vector< shortest_path_tree > spt_diff
std::map< std::string, std::string > property
runtime_error(const std::string &what)
graph_exception(const std::string &what)
unknown_graph(const std::string &name)
std::vector< edge_id_t > out_edges
local_node_exists(node_id_t id)
const char * what() const
MSGPACK_DEFINE(edge_query, node_query)
std::map< std::string, std::string > property
MSGPACK_DEFINE(score, out_degree_num)
jubatus::util::data::unordered_map< node_id_t, std::pair< uint64_t, node_id_t > > spt_edges
MSGPACK_DEFINE(property, in_edges, out_edges)
static uint64_t update(const std::vector< std::pair< std::string, std::string > > &q, uint64_t h)
bool operator==(const preset_query &r) const