Flex  0.17.9
shortest_path_among_three.h
Go to the documentation of this file.
1 
16 #ifndef ENGINES_GRAPH_DB_APP_BUILDIN_SHORTEST_PATH_AMONG_THREE_H_
17 #define ENGINES_GRAPH_DB_APP_BUILDIN_SHORTEST_PATH_AMONG_THREE_H_
19 #include "flex/engines/hqps_db/app/interactive_app_base.h"
20 
21 namespace gs {
23  : public CypherReadAppBase<std::string, std::string, std::string,
24  std::string, std::string, std::string> {
25  public:
27  results::CollectiveResults Query(const GraphDBSession& sess,
28  std::string label_name1, std::string oid1,
29  std::string label_name2, std::string oid2,
30  std::string label_name3, std::string oid3);
31 
32  private:
33  bool ShortestPath(const gs::ReadTransaction& txn, label_t v1_l,
34  vid_t v1_index, label_t v2_l, vid_t v2_index,
35  std::vector<std::pair<label_t, vid_t>>& result_);
36  std::vector<std::pair<label_t, vid_t>> ConnectPath(
37  const std::vector<std::pair<label_t, vid_t>>& path1,
38  const std::vector<std::pair<label_t, vid_t>>& path2,
39  const std::vector<std::pair<label_t, vid_t>>& path3);
40 };
41 
43  public:
46 
47  AppWrapper CreateApp(const GraphDB& db) override;
48 };
49 
50 } // namespace gs
51 
52 #endif
gs::ShortestPathAmongThreeFactory::CreateApp
AppWrapper CreateApp(const GraphDB &db) override
Definition: shortest_path_among_three.cc:255
gs::ShortestPathAmongThreeFactory::~ShortestPathAmongThreeFactory
~ShortestPathAmongThreeFactory()=default
graph_db_session.h
gs::vid_t
uint32_t vid_t
Definition: types.h:31
gs::ShortestPathAmongThreeFactory
Definition: shortest_path_among_three.h:42
gs
Definition: adj_list.h:23
gs::ShortestPathAmongThreeFactory::ShortestPathAmongThreeFactory
ShortestPathAmongThreeFactory()=default
gs::ShortestPathAmongThree::Query
results::CollectiveResults Query(const GraphDBSession &sess, std::string label_name1, std::string oid1, std::string label_name2, std::string oid2, std::string label_name3, std::string oid3)
Definition: shortest_path_among_three.cc:19
gs::GraphDBSession
Definition: graph_db_session.h:36
gs::GraphDB
Definition: graph_db.h:77
gs::ShortestPathAmongThree::ShortestPathAmongThree
ShortestPathAmongThree()
Definition: shortest_path_among_three.h:26
gs::ReadTransaction
Definition: read_transaction.h:375
gs::ShortestPathAmongThree::ShortestPath
bool ShortestPath(const gs::ReadTransaction &txn, label_t v1_l, vid_t v1_index, label_t v2_l, vid_t v2_index, std::vector< std::pair< label_t, vid_t >> &result_)
Definition: shortest_path_among_three.cc:117
gs::ShortestPathAmongThree
Definition: shortest_path_among_three.h:22
gs::AppWrapper
Definition: app_base.h:78
gs::ShortestPathAmongThree::ConnectPath
std::vector< std::pair< label_t, vid_t > > ConnectPath(const std::vector< std::pair< label_t, vid_t >> &path1, const std::vector< std::pair< label_t, vid_t >> &path2, const std::vector< std::pair< label_t, vid_t >> &path3)
Definition: shortest_path_among_three.cc:223
gs::label_t
uint8_t label_t
Definition: types.h:32
gs::AppFactoryBase
Definition: app_base.h:115