| igraph Reference Manual |
|---|
void igraph_spmatrix_scale(igraph_spmatrix_t *m, igraph_real_t by);
Arguments:
m: |
The matrix. |
by: |
The constant. |
Time complexity: O(n), the number of elements in the matrix.
int igraph_spmatrix_add_rows(igraph_spmatrix_t *m, long int n);
Arguments:
m: |
The sparse matrix object. |
n: |
The number of rows to add. |
Returns:
|
Error code. |
Time complexity: O(1).
int igraph_spmatrix_add_cols(igraph_spmatrix_t *m, long int n);
Arguments:
m: |
The sparse matrix object. |
n: |
The number of columns to add. |
Returns:
|
Error code. |
Time complexity: O(1).
int igraph_spmatrix_resize(igraph_spmatrix_t *m, long int nrow, long int ncol);
This function resizes a sparse matrix by adding more elements to it. The matrix retains its data even after resizing it, except for the data which lies outside the new boundaries (if the new size is smaller).
Arguments:
m: |
Pointer to an already initialized sparse matrix object. |
nrow: |
The number of rows in the resized matrix. |
ncol: |
The number of columns in the resized matrix. |
Returns:
|
Error code. |
Time complexity: O(n). n is the number of elements in the old matrix.
| << 4.4. Matrix query operations | 5. Stacks >> |