| 8 | #include "ipm/basiclu/lu_internal.h" |
| 9 | |
| 10 | lu_int basiclu_update |
| 11 | ( |
| 12 | lu_int istore[], |
| 13 | double xstore[], |
| 14 | lu_int Li[], |
| 15 | double Lx[], |
| 16 | lu_int Ui[], |
| 17 | double Ux[], |
| 18 | lu_int Wi[], |
| 19 | double Wx[], |
| 20 | double xtbl |
| 21 | ) |
| 22 | { |
| 23 | struct lu this; |
| 24 | lu_int status; |
| 25 | |
| 26 | status = lu_load(&this, istore, xstore, Li, Lx, Ui, Ux, Wi, Wx); |
| 27 | if (status != BASICLU_OK) |
| 28 | return status; |
| 29 | |
| 30 | if (! (Li && Lx && Ui && Ux && Wi && Wx)) |
| 31 | { |
| 32 | status = BASICLU_ERROR_argument_missing; |
| 33 | } |
| 34 | else if (this.nupdate < 0 || this.ftran_for_update < 0 || |
| 35 | this.btran_for_update < 0) |
| 36 | { |
| 37 | status = BASICLU_ERROR_invalid_call; |
| 38 | } |
| 39 | else |
| 40 | { |
| 41 | status = lu_update(&this, xtbl); |
| 42 | } |
| 43 | return lu_save(&this, istore, xstore, status); |
| 44 | } |
no test coverage detected