jubatus_core
0.1.2
Jubatus: Online machine learning framework for distributed environment
|
#include <graph_wo_index.hpp>
Classes | |
struct | config |
struct | diff_type |
Private Types | |
typedef jubatus::util::data::unordered_map< edge_id_t, edge_info > | edge_info_map |
typedef jubatus::util::data::unordered_map< node_id_t, node_info > | node_info_map |
Private Member Functions | |
void | get_diff_eigen_score (eigen_vector_query_diff &diff) const |
void | get_diff_shortest_path_tree (spt_query_diff &diff) const |
bool | is_node_matched_to_query (const preset_query &query, node_id_t id) const |
void | may_set_landmark (node_id_t id) |
void | put_diff_eigen_score (const eigen_vector_query_diff &mixed) |
void | put_diff_shortest_path_tree (const spt_query_diff &mixed) |
void | update_spt () |
void | update_spt_edges (const preset_query &query, spt_edges &se, node_id_t landmark, bool is_out) |
void | update_spt_node (const preset_query &query, const std::vector< edge_id_t > &edges, spt_edges &se, bool is_out) |
Static Private Member Functions | |
static void | mix (const eigen_vector_query_diff &diff, eigen_vector_query_diff &mixed) |
static void | mix (const spt_query_diff &diff, spt_query_diff &mixed, size_t landmark_num) |
static void | mix_spt (const shortest_path_tree &diff, shortest_path_tree &mixed) |
static void | remove_by_swap (std::vector< edge_id_t > &edges, edge_id_t eid) |
Private Attributes | |
config | config_ |
eigen_vector_query_diff | eigen_scores_ |
jubatus::util::data::unordered_map< node_id_t, uint8_t > | global_nodes_ |
edge_info_map | local_edges_ |
node_info_map | local_nodes_ |
spt_query_diff | spts_ |
Definition at line 38 of file graph_wo_index.hpp.
|
private |
Definition at line 132 of file graph_wo_index.hpp.
|
private |
Definition at line 130 of file graph_wo_index.hpp.
|
explicit |
Definition at line 73 of file graph_wo_index.cpp.
References clear(), jubatus::core::graph::graph_wo_index::config::damping_factor, JUBATUS_EXCEPTION, and jubatus::core::graph::graph_wo_index::config::landmark_num.
jubatus::core::graph::graph_wo_index::graph_wo_index | ( | ) |
Definition at line 89 of file graph_wo_index.cpp.
References clear().
jubatus::core::graph::graph_wo_index::~graph_wo_index | ( | ) |
Definition at line 93 of file graph_wo_index.cpp.
void jubatus::core::graph::graph_wo_index::add_centrality_query | ( | const preset_query & | query | ) |
Definition at line 222 of file graph_wo_index.cpp.
References eigen_scores_.
void jubatus::core::graph::graph_wo_index::add_shortest_path_query | ( | const preset_query & | query | ) |
Definition at line 226 of file graph_wo_index.cpp.
References spts_.
double jubatus::core::graph::graph_wo_index::centrality | ( | node_id_t | id, |
centrality_type | ct, | ||
const preset_query & | query | ||
) | const |
Definition at line 238 of file graph_wo_index.cpp.
References eigen_scores_, jubatus::core::graph::EIGENSCORE, and JUBATUS_EXCEPTION.
void jubatus::core::graph::graph_wo_index::clear | ( | ) |
Definition at line 100 of file graph_wo_index.cpp.
References eigen_scores_, global_nodes_, local_edges_, local_nodes_, and spts_.
Referenced by graph_wo_index().
void jubatus::core::graph::graph_wo_index::create_edge | ( | edge_id_t | eid, |
node_id_t | src, | ||
node_id_t | tgt | ||
) |
Definition at line 170 of file graph_wo_index.cpp.
References JUBATUS_EXCEPTION, local_edges_, local_nodes_, jubatus::core::graph::edge_info::src, and jubatus::core::graph::edge_info::tgt.
void jubatus::core::graph::graph_wo_index::create_global_node | ( | node_id_t | id | ) |
Definition at line 132 of file graph_wo_index.cpp.
References global_nodes_, and JUBATUS_EXCEPTION.
void jubatus::core::graph::graph_wo_index::create_node | ( | node_id_t | id | ) |
Definition at line 108 of file graph_wo_index.cpp.
References JUBATUS_EXCEPTION, local_nodes_, and may_set_landmark().
void jubatus::core::graph::graph_wo_index::damping_factor | ( | double | a | ) |
Definition at line 96 of file graph_wo_index.cpp.
References config_, and jubatus::core::graph::graph_wo_index::config::damping_factor.
void jubatus::core::graph::graph_wo_index::get_diff | ( | diff_type & | diff | ) | const |
Definition at line 607 of file graph_wo_index.cpp.
References jubatus::core::graph::graph_wo_index::diff_type::eigen_vector_query, get_diff_eigen_score(), get_diff_shortest_path_tree(), jubatus::core::graph::graph_wo_index::diff_type::spt_query, and update_spt().
Referenced by update_index().
|
private |
Definition at line 372 of file graph_wo_index.cpp.
References config_, jubatus::core::graph::graph_wo_index::config::damping_factor, jubatus::core::clustering::dist(), jubatus::core::graph::preset_query::edge_query, eigen_scores_, is_node_matched_to_query(), local_edges_, local_nodes_, jubatus::core::graph::preset_query::node_query, jubatus::core::graph::eigen_vector_info::out_degree_num, jubatus::core::graph::edge_info::p, jubatus::core::graph::eigen_vector_info::score, and jubatus::core::graph::edge_info::tgt.
Referenced by get_diff().
|
private |
Definition at line 567 of file graph_wo_index.cpp.
References jubatus::core::graph::shortest_path_tree::from_root, jubatus::core::graph::shortest_path_tree::landmark, local_nodes_, spts_, and jubatus::core::graph::shortest_path_tree::to_root.
Referenced by get_diff().
Definition at line 345 of file graph_wo_index.cpp.
References JUBATUS_EXCEPTION, and local_edges_.
Definition at line 337 of file graph_wo_index.cpp.
References JUBATUS_EXCEPTION, and local_nodes_.
Referenced by remove_node().
void jubatus::core::graph::graph_wo_index::get_status | ( | std::map< std::string, std::string > & | status | ) | const |
Definition at line 621 of file graph_wo_index.cpp.
References global_nodes_, local_edges_, and local_nodes_.
|
inline |
Definition at line 117 of file graph_wo_index.hpp.
|
private |
Definition at line 546 of file graph_wo_index.cpp.
References local_nodes_, and jubatus::core::graph::preset_query::node_query.
Referenced by get_diff_eigen_score(), may_set_landmark(), and update_spt_node().
|
private |
Definition at line 116 of file graph_wo_index.cpp.
References config_, is_node_matched_to_query(), jubatus::core::graph::shortest_path_tree::landmark, jubatus::core::graph::graph_wo_index::config::landmark_num, and spts_.
Referenced by create_node(), and update_node().
Definition at line 627 of file graph_wo_index.cpp.
References config_, jubatus::core::graph::graph_wo_index::diff_type::eigen_vector_query, jubatus::core::graph::graph_wo_index::config::landmark_num, and jubatus::core::graph::graph_wo_index::diff_type::spt_query.
|
staticprivate |
Definition at line 632 of file graph_wo_index.cpp.
|
staticprivate |
Definition at line 659 of file graph_wo_index.cpp.
References mix_spt().
|
staticprivate |
Definition at line 645 of file graph_wo_index.cpp.
References jubatus::core::graph::shortest_path_tree::from_root, and jubatus::core::graph::shortest_path_tree::to_root.
Referenced by mix().
jubatus::core::graph::graph_wo_index::MSGPACK_DEFINE | ( | local_nodes_ | , |
local_edges_ | , | ||
global_nodes_ | , | ||
eigen_scores_ | , | ||
spts_ | |||
) |
void jubatus::core::graph::graph_wo_index::pack | ( | framework::packer & | packer | ) | const |
Definition at line 357 of file graph_wo_index.cpp.
bool jubatus::core::graph::graph_wo_index::put_diff | ( | const diff_type & | mixed | ) |
Definition at line 615 of file graph_wo_index.cpp.
References jubatus::core::graph::graph_wo_index::diff_type::eigen_vector_query, put_diff_eigen_score(), put_diff_shortest_path_tree(), and jubatus::core::graph::graph_wo_index::diff_type::spt_query.
Referenced by update_index().
|
private |
Definition at line 484 of file graph_wo_index.cpp.
References eigen_scores_.
Referenced by put_diff().
|
private |
Definition at line 602 of file graph_wo_index.cpp.
References spts_.
Referenced by put_diff().
|
staticprivate |
Definition at line 695 of file graph_wo_index.cpp.
References jubatus::core::clustering::swap().
Referenced by remove_edge().
void jubatus::core::graph::graph_wo_index::remove_centrality_query | ( | const preset_query & | query | ) |
Definition at line 230 of file graph_wo_index.cpp.
References eigen_scores_.
void jubatus::core::graph::graph_wo_index::remove_edge | ( | edge_id_t | eid | ) |
Definition at line 204 of file graph_wo_index.cpp.
References JUBATUS_EXCEPTION, local_edges_, local_nodes_, and remove_by_swap().
void jubatus::core::graph::graph_wo_index::remove_global_node | ( | node_id_t | id | ) |
Definition at line 139 of file graph_wo_index.cpp.
References global_nodes_, and JUBATUS_EXCEPTION.
void jubatus::core::graph::graph_wo_index::remove_node | ( | node_id_t | id | ) |
Definition at line 155 of file graph_wo_index.cpp.
References get_node(), jubatus::core::graph::node_info::in_edges, JUBATUS_EXCEPTION, local_nodes_, and jubatus::core::graph::node_info::out_edges.
void jubatus::core::graph::graph_wo_index::remove_shortest_path_query | ( | const preset_query & | query | ) |
void jubatus::core::graph::graph_wo_index::shortest_path | ( | node_id_t | src, |
node_id_t | tgt, | ||
uint64_t | max_hop, | ||
std::vector< node_id_t > & | ret, | ||
const preset_query & | query | ||
) | const |
Definition at line 258 of file graph_wo_index.cpp.
References config_, jubatus::core::graph::shortest_path_tree::from_root, global_nodes_, JUBATUS_EXCEPTION, jubatus::core::graph::graph_wo_index::config::landmark_num, spts_, and jubatus::core::graph::shortest_path_tree::to_root.
string jubatus::core::graph::graph_wo_index::type | ( | ) | const |
Definition at line 353 of file graph_wo_index.cpp.
void jubatus::core::graph::graph_wo_index::unpack | ( | msgpack::object | o | ) |
Definition at line 361 of file graph_wo_index.cpp.
Definition at line 196 of file graph_wo_index.cpp.
References JUBATUS_EXCEPTION, and local_edges_.
void jubatus::core::graph::graph_wo_index::update_index | ( | ) |
Definition at line 365 of file graph_wo_index.cpp.
References get_diff(), put_diff(), and update_spt().
Definition at line 146 of file graph_wo_index.cpp.
References JUBATUS_EXCEPTION, local_nodes_, and may_set_landmark().
|
private |
Definition at line 556 of file graph_wo_index.cpp.
References jubatus::core::graph::shortest_path_tree::from_root, jubatus::core::graph::shortest_path_tree::landmark, spts_, jubatus::core::graph::shortest_path_tree::to_root, and update_spt_edges().
Referenced by get_diff(), and update_index().
|
private |
Definition at line 498 of file graph_wo_index.cpp.
References local_nodes_, and update_spt_node().
Referenced by update_spt().
|
private |
Definition at line 514 of file graph_wo_index.cpp.
References jubatus::core::clustering::dist(), jubatus::core::graph::preset_query::edge_query, is_node_matched_to_query(), local_edges_, jubatus::core::graph::edge_info::p, jubatus::core::graph::edge_info::src, and jubatus::core::graph::edge_info::tgt.
Referenced by update_spt_edges().
|
private |
Definition at line 187 of file graph_wo_index.hpp.
Referenced by damping_factor(), get_diff_eigen_score(), may_set_landmark(), mix(), and shortest_path().
|
private |
Definition at line 151 of file graph_wo_index.hpp.
Referenced by add_centrality_query(), centrality(), clear(), get_diff_eigen_score(), put_diff_eigen_score(), and remove_centrality_query().
|
private |
Definition at line 140 of file graph_wo_index.hpp.
Referenced by clear(), create_global_node(), get_status(), remove_global_node(), and shortest_path().
|
private |
Definition at line 137 of file graph_wo_index.hpp.
Referenced by clear(), create_edge(), get_diff_eigen_score(), get_edge(), get_status(), remove_edge(), update_edge(), and update_spt_node().
|
private |
Definition at line 136 of file graph_wo_index.hpp.
Referenced by clear(), create_edge(), create_node(), get_diff_eigen_score(), get_diff_shortest_path_tree(), get_node(), get_status(), is_node_matched_to_query(), remove_edge(), remove_node(), update_node(), and update_spt_edges().
|
private |
Definition at line 185 of file graph_wo_index.hpp.
Referenced by add_shortest_path_query(), clear(), get_diff_shortest_path_tree(), may_set_landmark(), put_diff_shortest_path_tree(), remove_shortest_path_query(), shortest_path(), and update_spt().