9 for (col = 0; col < M->
ncol; col++)
11 M->
x[index] *= S[col];
17 for (index = 0; index < M->
nzmax; index++)
18 M->
x[index] *= S[M->
i[index]];
24 for (index = 0; index < M->
nzmax; index++)
32 for (col = 0; col < M->
ncol; col++)
43 for (row = 0; row < M->
nrow; row++) norms[row] = 0;
44 for (index = 0; index < M->
nzmax; index++)
#define LADEL_FOR(index, M, col)
Loop through a column of a sparse matrix.
#define LADEL_MAX(a, b)
Return the maximum of two numbers.
#define LADEL_ABS(a)
Return the absolute value a number.
Memory allocation routines.
void ladel_scale_scalar(ladel_sparse_matrix *M, ladel_double s)
Scales the elements of M with s, that is .
void ladel_infinity_norm_rows(ladel_sparse_matrix *M, ladel_double *norms)
Computes the row-wise infinity norms, that is .
void ladel_infinity_norm_columns(ladel_sparse_matrix *M, ladel_double *norms)
Computes the column-wise infinity norms, that is .
void ladel_scale_rows(ladel_sparse_matrix *M, const ladel_double *S)
Scales the rows of M with the scalars in S, that is .
void ladel_scale_columns(ladel_sparse_matrix *M, const ladel_double *S)
Scales the columns of M with the scalars in S, that is .
Routines to scale the columns and rows of a matrix, or the whole matrix itself.
Structures and types used in LADEL routines.
int64_t ladel_int
Type for integer numbers (default: int64_t)
double ladel_double
Type for floating point numbers (default: double)
Sparse matrix in compressed column storage.
ladel_int ncol
number of columns
ladel_double * x
numerical values (size nzmax)
ladel_int nzmax
number of nonzeros
ladel_int nrow
number of rows
ladel_int * i
row pointers (size nzmax)