| igraph Reference Manual |
|---|
int igraph_weighted_adjacency(igraph_t *graph, igraph_matrix_t *adjmatrix, igraph_adjacency_t mode, const char* attr);
The order of the vertices in the matrix is preserved, i.e. the vertex corresponding to the first row/column will be vertex with id 0, the next row is for vertex 1, etc.
Arguments:
|
Pointer to an uninitialized graph object. |
||||||||||||||
|
The weighted adjacency matrix. How it is interpreted
depends on the |
||||||||||||||
|
Constant to specify how the given matrix is interpreted
as an adjacency matrix. Possible values
(A(i,j)
is the element in row i and column
j in the adjacency matrix
(
|
||||||||||||||
|
the name of the attribute that will store the edge weights.
If |
Returns:
Error code,
|
Time complexity: O(|V||V|), |V| is the number of vertices in the graph.a
<< 1.3. igraph_adjacency — Creates a graph object from an adjacency matrix. |
1.5. igraph_adjlist — Create a graph from an adjacency list >> |