Scilab function

graph_power - kth power of a directed 1-graph

Calling Sequence

g1 = graph_power(g,k)



graph_power computes the directed graph g1 which is the kth power of directed 1-graph g. There is an arc between two nodes in g1 if there exists a path between these nodes of length at most k in g. graph_power(g,1) is graph g.

If such a graph does not exist, an empty vector is returned.