Linsolqr

From ASCEND

Jump to: navigation, search
NLA
QRSlv
CMSlv
IPSlv
Opt
NLP
CONOPT
IPOPT
TRON
MINOS
NGSlv
OptSQP
DAE/ODE
IDA
LSODE
DOPRI5
LA
linsolqr
linsol
LP
MakeMPS
Logic
LRSlv

The is the ASCEND linear solver with QR decomposition. Functional.

[edit] Methods

RANKI based methods [1] with reordering by SPK1 [2] are the recommended ones, although several others are implemented. ranki_ba2 is the best.

plain_qr

cond_qr broken

opt_qr ???

See also mtx.

There is a 'demonstration' of the RANKI algorithm in Karl Westerberg's documentation[3] of linsol.

[edit] Simple usage

Here is a simple C code example showing how to determine if a given sparse matrix is of full rank:

#include <linear/linsolqr.h>
int rank(mtx_matrix_t M){
    mtx_range_t R;
    R.row.low = R.col.low = 0;
    R.row.high = R.col.high = mtx_order(M) - 1;

    L = linsolqr_create_default();
    linsolqr_set_matrix(L,M);
    linsolqr_set_region(L,R);
    linsolqr_prep(L,linsolqr_fmethod_to_fclass(linsolqr_fmethod(L)));
    linsolqr_reorder(L, &R, linsolqr_rmethod(L));
    linsolqr_factor(L,linsolqr_fmethod(L));
    r = linsolqr_rank(L);
    linsolqr_destroy(L);
    return r;
}

[edit] References

  1. Stadtherr & Wood, 1984, Comp Chem Eng (8) 9-18 http://dx.doi.org/10.1016/0098-1354(84)80011-3
  2. Stadtherr & Wodd, 1984 Comp Chem Eng (8) 1-8 http://dx.doi.org/10.1016/0098-1354(84)80010-1
  3. http://ascend.cheme.cmu.edu/ftp/pdfPapersRptsSlides/linear_rpt.pdf#page=22
Personal tools