用于K个最近链接的滑动窗口在相邻列表上搜索表示的路线图

时间:2016-02-08 16:14:28

标签: algorithm graph gis knn sliding-window

我正在道路网络上进行K最近的链接搜索,该搜索由邻接列表(例如adj[1] = {{3,0.5},{8,0.6},{9,1.0}} means node1 is connected to node 3, 8, 9 and the links have the weights of 0.5, 0.6, 1.0 respectively.)表示。我想使用一个滑动窗口,所以当搜索一个点,而不是解析整个图形时,我可以使用滑动窗口来搜索内部的本地邻居。 但是,我真的不知道如何获得这个窗口(或者更确切地说是这个窗口内的链接)。

PS: 我在C ++中用于邻接列表的数据结构:

struct neighbor{
    int id; 
    double weight;
};

typedef map<int, vector<neighbor> > adjacency_list;

0 个答案:

没有答案