1 #ifndef ALREADY_zpspecial
2 #define ALREADY_zpspecial
15 tableplus[MON_PREMIER+
i].
rep=
i;
20 tablemoins[MON_PREMIER+
i].
rep=MON_PREMIER-
i;
27 rep=tableplus[rep+z.
rep].
rep;
34 return tableplus[rep+b.
rep];
40 rep=tablemoins[rep+z.
rep].
rep;
98 {
int tmp=rep; rep=(
short int)((tmp * z.
rep)%
MON_PREMIER);
return *
this;}
107 res.
rep=(tmp*b.
rep)%MON_PREMIER;
122 inverse=(
int*)
malloc(MON_PREMIER*
sizeof(
int));
124 cout<<
"je malloc tout ca"<<endl;
136 {std::cerr<<
"division by zero"<<endl;exit(-10);}
137 if(inverse[(
short int)z.
rep]==-1)
143 int bez_1_1=1,bez_1_2=0;
144 int bez_2_1=0,bez_2_2=1;
151 expon[2*comp]=(expon[comp]*expon[comp]) %
MON_PREMIER;
152 inversez=expon[comp];
153 for(
int total=comp;total<MON_PREMIER-2;total+=comp)
155 for(;comp+total>MON_PREMIER-2;comp/=2);
156 inversez=(inversez * expon[comp]) %MON_PREMIER;
159 inverse[z.
rep]=inversez;
161 flag=rep *inverse[z.
rep];
215 int pivptr, old_pivptr, diag, diagind;
221 int isub, icol,
k, itemp;
225 extern SuperLUStat_t SuperLUStat;
226 flops_t *ops = SuperLUStat.ops;
232 xlusup = Glu->xlusup;
233 fsupc = (Glu->xsup)[(Glu->supno)[jcol]];
234 nsupc = jcol - fsupc;
236 nsupr = xlsub[fsupc+1] - lptr;
237 lu_sup_ptr = &lusup[xlusup[fsupc]];
238 lu_col_ptr = &lusup[xlusup[jcol]];
239 lsub_ptr = &lsub[lptr];
242 if ( jcol == MIN_COL ) {
243 printf(
"Before cdiv: col %d\n", jcol);
244 for (k = nsupc; k < nsupr; k++)
245 printf(
" lu[%d] %f\n", lsub_ptr[k], lu_col_ptr[k]);
251 if ( *usepr ) *pivrow = iperm_r[jcol];
252 diagind = iperm_c[jcol];
257 for (isub = nsupc; isub < nsupr; ++isub) {
258 rtemp = lu_col_ptr[isub];
265 if ( *usepr && lsub_ptr[isub] == *pivrow ) old_pivptr = isub;
266 if ( lsub_ptr[isub] == diagind ) diag = isub;
271 *pivrow = lsub_ptr[nsupc];
273 perm_r[*pivrow] = jcol;
283 rtemp = lu_col_ptr[old_pivptr];
293 rtemp = lu_col_ptr[diag];
296 *pivrow = lsub_ptr[pivptr];
301 perm_r[*pivrow] = jcol;
304 if ( pivptr != nsupc ) {
305 itemp = lsub_ptr[pivptr];
306 lsub_ptr[pivptr] = lsub_ptr[nsupc];
307 lsub_ptr[nsupc] = itemp;
312 for (icol = 0; icol <= nsupc; icol++) {
313 itemp = pivptr + icol * nsupr;
314 temp = lu_sup_ptr[itemp];
315 lu_sup_ptr[itemp] = lu_sup_ptr[nsupc + icol*nsupr];
316 lu_sup_ptr[nsupc + icol*nsupr] = temp;
321 ops[FACT] += nsupr - nsupc;
323 for (k = nsupc+1; k < nsupr; k++)
324 lu_col_ptr[k] *= temp;
329 {
return c==(
short int)0;}
337 #endif //ALREADY_zpspecial
Z< p, T > & operator-=(const Z< p, T > z)
Definition: Zp.hpp:46
long flag
Definition: alp_f2c.H:52
void inverse(int *&, int)
#define MON_PREMIER
Definition: solver_bb_mod.cpp:43
Z< p, T > operator-(const Z< p, T > &b) const
Definition: Zp.hpp:71
Z< p, T > & operator+=(const Z< p, T > z)
Definition: Zp.hpp:38
MSKint32t k
Definition: mosek.h:2713
void convert(C &, char *)
Z< p, T > & operator/=(const Z< p, T > z)
Definition: Zp.C:19
MSKrealt * c
Definition: mosek.h:2678
Z< p, T > & operator*=(const Z< p, T > z)
Definition: Zp.hpp:53
MSKint32t MSKint32t MSKint32t i
Definition: mosek.h:2278
int Iszero(const Scl< MPQ > &c)
Definition: Iszero.hpp:14
Z< p, T > operator+(const Z< p, T > &b) const
Definition: Zp.hpp:63
T rep
Definition: Zp.hpp:25
int dpivotL(const int jcol, const macrev_Z u, int *usepr, int *perm_r, int *iperm_r, int *iperm_c, int *pivrow, GlobalLU_t< macrev_Z > *Glu)
Definition: dpivmacrev_z.hpp:6
Z< p, T > operator*(const Z< p, T > &b) const
Definition: Zp.hpp:84