Function graspi::compute_shortest_distance_from_sourceC_to_targetC¶
Function Documentation¶
-
void
graspi::compute_shortest_distance_from_sourceC_to_targetC(unsigned int sourceC, unsigned int targetC, graph_t *G, const dim_g_t &d_g, const vertex_colors_t &C, const edge_weights_t &W, std::vector<float> &d, std::string filename = "")¶ The function to compute the shortest path from the source vertex to target vertex
- Parameters
sourceC: is the color/label of the source vertextargetC: is the color/label of the source vertexG: is the input graphd_g: is the reference to the struct storing the dimension of graph verticesC: is the reference to the vector storing the labels/colors of vertices in the graph GW: is the reference to the map storing the weights of the edgesd: is the reference to the vector with the lengths of the shortest pathsfilename: is the filename to save the results of this function, here the vector of path lengths/distances