3.3. Initializing elements

3.3.1. igraph_matrix_null — Sets all element in a matrix to zero.
3.3.2. igraph_matrix_fill — Fill with an element.

3.3.1. igraph_matrix_null — Sets all element in a matrix to zero.

void igraph_matrix_null(igraph_matrix_t *m);

Arguments: 

m:

Pointer to an initialized matrix object.

Time complexity: O(n), n is the number of elements in the matrix.

3.3.2. igraph_matrix_fill — Fill with an element.

void igraph_matrix_fill(igraph_matrix_t *m, igraph_real_t e);

Set the matrix to a constant matrix.

Arguments: 

m:

The input matrix.

e:

The element to set.

Time complexity: O(mn), the number of elements.