Debian Codegraph @

external/glpk/glpbfx.c

raw symbols SCIP
1 /* glpbfx.c */cxx . . $ `<file>/external/glpk/glpbfx.c`/
2
3 /***********************************************************************
4 * This code is part of GLPK (GNU Linear Programming Kit).
5 *
6 * Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,
7 * 2009, 2010 Andrew Makhorin, Department for Applied Informatics,
8 * Moscow Aviation Institute, Moscow, Russia. All rights reserved.
9 * E-mail: <[email protected]>.
10 *
11 * GLPK is free software: you can redistribute it and/or modify it
12 * under the terms of the GNU General Public License as published by
13 * the Free Software Foundation, either version 3 of the License, or
14 * (at your option) any later version.
15 *
16 * GLPK is distributed in the hope that it will be useful, but WITHOUT
17 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
18 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
19 * License for more details.
20 *
21 * You should have received a copy of the GNU General Public License
22 * along with GLPK. If not, see <http://www.gnu.org/licenses/>.
23 ***********************************************************************/
24
25 typedef struct BFXcxx . . $ BFX# BFXcxx . . $ BFX#;
26 #define GLPBFX_DEFINEDcxx . . $ `external/glpk/glpbfx.c:26:9`!
27 #include "glpbfx.h"cxx . . $ `<file>/external/glpk/glpbfx.h`/
28 #include "glpenv.h"cxx . . $ `<file>/external/glpk/glpenv.h`/
29 #include "glplux.h"cxx . . $ `<file>/external/glpk/glplux.h`/
30
31 struct BFXcxx . . $ BFX#
32 { int validcxx . . $ BFX#valid.;
33 LUXcxx . . $ LUX# *luxcxx . . $ BFX#lux.;
34 };
35
36 BFXcxx . . $ BFX# *bfx_create_binvcxx . . $ `external/glpk/glpbfx.h:35:9`!(void)
37 { /* create factorization of the basis matrix */
38 BFXcxx . . $ BFX# *bfx;
39 bfx = xmalloccxx . . $ `external/glpk/glpenv.h:167:9`!(sizeof(BFXcxx . . $ BFX#));
40 bfx->validcxx . . $ BFX#valid. = 0;
41 bfx->luxcxx . . $ BFX#lux. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!;
42 return bfx;
43 }
44
45 int bfx_factorizecxx . . $ `external/glpk/glpbfx.h:38:9`!(BFXcxx . . $ BFX# *binv, int m, int (*col)(void *info, int j,
46 int ind[], mpq_tcxx . . $ mpq_t# val[]), void *info)
47 { /* compute factorization of the basis matrix */
48 int ret;
49 xassertcxx . . $ `external/glpk/glpenv.h:162:9`!(m > 0);
50 if (binv->luxcxx . . $ BFX#lux. != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`! && binv->luxcxx . . $ BFX#lux.->ncxx . . $ LUX#n. != m)
51 { lux_deletecxx . . $ `external/glpk/glplux.h:198:9`!(binv->luxcxx . . $ BFX#lux.);
52 binv->luxcxx . . $ BFX#lux. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!;
53 }
54 if (binv->luxcxx . . $ BFX#lux. == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!)
55 binv->luxcxx . . $ BFX#lux. = lux_createcxx . . $ `external/glpk/glplux.h:193:9`!(m);
56 ret = lux_decompcxx . . $ `external/glpk/glplux.h:194:9`!(binv->luxcxx . . $ BFX#lux., col, info);
57 binv->validcxx . . $ BFX#valid. = (ret == 0);
58 return ret;
59 }
60
61 void bfx_ftrancxx . . $ `external/glpk/glpbfx.h:39:9`!(BFXcxx . . $ BFX# *binv, mpq_tcxx . . $ mpq_t# x[], int save)
62 { /* perform forward transformation (FTRAN) */
63 xassertcxx . . $ `external/glpk/glpenv.h:162:9`!(binv->valid);
64 lux_solvecxx . . $ `external/glpk/glplux.h:197:9`!(binv->luxcxx . . $ BFX#lux., 0, x);
65 xassertcxx . . $ `external/glpk/glpenv.h:162:9`!(save == save);
66 return;
67 }
68
69 void bfx_btrancxx . . $ `external/glpk/glpbfx.h:40:9`!(BFXcxx . . $ BFX# *binv, mpq_tcxx . . $ mpq_t# x[])
70 { /* perform backward transformation (BTRAN) */
71 xassertcxx . . $ `external/glpk/glpenv.h:162:9`!(binv->valid);
72 lux_solvecxx . . $ `external/glpk/glplux.h:197:9`!(binv->luxcxx . . $ BFX#lux., 1, x);
73 return;
74 }
75
76 int bfx_updatecxx . . $ `external/glpk/glpbfx.h:41:9`!(BFXcxx . . $ BFX# *binv, int j)
77 { /* update factorization of the basis matrix */
78 xassertcxx . . $ `external/glpk/glpenv.h:162:9`!(binv->valid);
79 xassertcxx . . $ `external/glpk/glpenv.h:162:9`!(1 <= j && j <= binv->lux->n);
80 return 1;
81 }
82
83 void bfx_delete_binvcxx . . $ `external/glpk/glpbfx.h:42:9`!(BFXcxx . . $ BFX# *binv)
84 { /* delete factorization of the basis matrix */
85 if (binv->luxcxx . . $ BFX#lux. != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!)
86 lux_deletecxx . . $ `external/glpk/glplux.h:198:9`!(binv->luxcxx . . $ BFX#lux.);
87 xfreecxx . . $ `external/glpk/glpenv.h:175:9`!(binv);
88 return;
89 }
90
91 /* eof */