shortestPath - 2023.2 English

Vitis Libraries

Release Date
2023-12-20
Version
2023.2 English
#include "xf_graph_L3.hpp"
event <int> shortestPath (
    xf::graph::L3::Handle& handle,
    uint32_t nSource,
    uint32_t* sourceID,
    bool weighted,
    xf::graph::Graph <uint32_t, float> gr,
    float** result,
    uint32_t** predecent
    )

The single source shortest path algorithm is implemented, the input is the matrix in CSR format.

Parameters:

handle Graph library L3 handle
nSource Number of source vertices
sourceID IDs of giving source vertices
weighted Bool type flag, when weighted is flag 0, all weights are treated as 1, and when weighted flag is 1, the weights in the gr will be used
gr Input, CSR graph of IDs’ type of uint32_t and weights’ type of float
result The distance result from giving source vertices for each vertex
predecent The result of parent index of each vertex from giving source vertices for each vertex