Hi! It is hard to say why it is slow, if you don't show the code. Please consider uploading it to github or gist.github.com.
Setting an element in a dense matrix has O(1) time complexity, so that should not be slow at all. Best, Gabor On Tue, Jan 28, 2014 at 9:20 AM, Pierre-Andre Maugis <[email protected]>wrote: > Hello, > > I am trying to build the non-backtracking matrix of a network. It is the > matrix whose entries are indexed by the edges of the graph. Entries are 0 > if the said edges do not form a path of length two, and 1 if they do. More > details can be found in arXiv:1306.5550, p3. > > All the algorithms I could produce are very slow. Computing the entries is > not a problem, however storing them properly in the matrix is, and takes a > lot of time. > > I would welcome any suggestion on the topic. > Best, > Pierre-André Maugis > > _______________________________________________ > igraph-help mailing list > [email protected] > https://lists.nongnu.org/mailman/listinfo/igraph-help > >
_______________________________________________ igraph-help mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/igraph-help
