1
#ifndef INCOMPLETE_QR_H
2
#define INCOMPLETE_QR_H
4
// input: sparse matrix A (m by n, in CSC format),
5
// drop tolerance for keeping intermediate Q sparse,
6
// and sparsity structure of n by n upper triangular factor R
7
// output: values in R so that R is roughly the R in the QR decomposition of A (i.e. Cholesky factor of A^T*A)
9
// Note that Rvalue should already be allocated when calling this function
11
void incomplete_qr(int m, int n, const int *Acolstart, const int *Arowindex, const double *Avalue,
13
const int *Rcolstart, const int *Rrowindex, double *Rvalue, double *Rdiag);