Hi Yan,
Thanks for making the implementation public, great work.
I'd like to use your code, but I'd need to make two modifications. Also, a question about the licence.
- Instead of searching for the k shortest paths, I'd like to compute the interval between 2 vertices, i.e. all the alternative paths with the same shortest distance.
I think I would just need to change the following lines in YenTopKShortestPathsAlg::get_shortest_paths:
while (has_next() && count < top_k)
{
next();
++count;
}
so that after each next(), it checks for the cost of the path, and if it has increased, then we know that it's no longer a shortest path. Would you have any suggestions?
Also, how do I extract the paths? I think for each path, I can do something like what you have in the PrintOut method of class Path
for(std::vector<BaseVertex*>::const_iterator pos=m_vtVertexList.begin(); pos!=m_vtVertexList.end();++pos)
{
out_stream << (*pos)->getID() << " ";
}
but how do I get the list of paths in the first place?
-
I'd like to write a Matlab MEX interface, to run the code from Matlab. What would you recommend in order to read the graph from a memory array, instead of a file?
-
Finally, it'd be great if I could distribute the modified work with the rest of my toolbox (https://github.com/vigente/gerardus), but you have not provided a licence. Have you considering licensing your code as open source?
Best regards.
Ramon.
Hi Yan,
Thanks for making the implementation public, great work.
I'd like to use your code, but I'd need to make two modifications. Also, a question about the licence.
I think I would just need to change the following lines in YenTopKShortestPathsAlg::get_shortest_paths:
so that after each
next(), it checks for the cost of the path, and if it has increased, then we know that it's no longer a shortest path. Would you have any suggestions?Also, how do I extract the paths? I think for each path, I can do something like what you have in the PrintOut method of class Path
but how do I get the list of paths in the first place?
I'd like to write a Matlab MEX interface, to run the code from Matlab. What would you recommend in order to read the graph from a memory array, instead of a file?
Finally, it'd be great if I could distribute the modified work with the rest of my toolbox (https://github.com/vigente/gerardus), but you have not provided a licence. Have you considering licensing your code as open source?
Best regards.
Ramon.