Boost Graph Adjacency matrix to boost uBLAS integer matrix
Hi List I am wondering if there is any function that I can use to extract the actual adjacency matrix (square 0/1 matrix) from adjacency_matrix graph object and convert it into uBLAS integer matrix. I can create an zero matrix, and then get the edge list from the graph and go through it one by one to form such a matrix. But if anyone know any better way around, I would appreciate your input. Thank you. Masanao
On Sun, 14 Nov 2010, Masanao Yajima wrote:
Hi List
I am wondering if there is any function that I can use to extract the actual adjacency matrix (square 0/1 matrix) from adjacency_matrix graph object and convert it into uBLAS integer matrix.
I can create an zero matrix, and then get the edge list from the graph and go through it one by one to form such a matrix. But if anyone know any better way around, I would appreciate your input.
I do not know of an easy way, although the internal data formats are probably the same between the two types. You might want to post this on the uBLAS mailing list (<URL:http://lists.boost.org/mailman/listinfo.cgi/ublas>) as well if you haven't already. -- Jeremiah Willcock
participants (2)
-
Jeremiah Willcock
-
Masanao Yajima