MCPcopy Create free account
hub / github.com/Singular/Singular / MwalkNextWeightCC

Function MwalkNextWeightCC

Singular/walk.cc:2229–2563  ·  view source on GitHub ↗

* Compute a next weight vector between curr_weight and target_weight * * with respect to an ideal . * **********************************************************************/ static intvec* MwalkNextWeightCC(intvec* curr_weight, intvec* target_weight, ideal G) { BOOLEAN nError = Overflow_Error; Overflow_Error = FALSE;

Source from the content-addressed store, hash-verified

2227 * with respect to an ideal <G>. *
2228**********************************************************************/
2229static intvec* MwalkNextWeightCC(intvec* curr_weight, intvec* target_weight,
2230 ideal G)
2231{
2232 BOOLEAN nError = Overflow_Error;
2233 Overflow_Error = FALSE;
2234
2235 assume(currRing != NULL && curr_weight != NULL &&
2236 target_weight != NULL && G != NULL);
2237
2238 int nRing = currRing->N;
2239 int j, nG = IDELEMS(G);
2240 intvec* ivtemp;
2241
2242 mpz_t t_zaehler, t_nenner;
2243 mpz_init(t_zaehler);
2244 mpz_init(t_nenner);
2245
2246 mpz_t s_zaehler, s_nenner, temp, MwWd;
2247 mpz_init(s_zaehler);
2248 mpz_init(s_nenner);
2249 mpz_init(temp);
2250 mpz_init(MwWd);
2251
2252 mpz_t sing_int;
2253 mpz_init(sing_int);
2254 mpz_set_ui(sing_int, 2147483647);
2255
2256 mpz_t sing_int_half;
2257 mpz_init(sing_int_half);
2258 mpz_set_ui(sing_int_half, 3*(1073741824/2));
2259
2260 mpz_t deg_w0_p1, deg_d0_p1;
2261 mpz_init(deg_w0_p1);
2262 mpz_init(deg_d0_p1);
2263
2264 mpz_t sztn, sntz;
2265 mpz_init(sztn);
2266 mpz_init(sntz);
2267
2268 mpz_t t_null;
2269 mpz_init(t_null);
2270
2271 mpz_t ggt;
2272 mpz_init(ggt);
2273
2274 mpz_t dcw;
2275 mpz_init(dcw);
2276
2277 int gcd_tmp;
2278 //intvec* diff_weight = MivSub(target_weight, curr_weight);
2279
2280 intvec* diff_weight1 = new intvec(nRing); //MivSub(target_weight, curr_weight);
2281 poly g;
2282
2283 // reduce the size of the entries of the current weight vector
2284 if(TEST_OPT_REDSB)
2285 {
2286 for (j=0; j<nRing; j++)

Callers 4

MkInterRedNextWeightFunction · 0.85
MwalkFunction · 0.85
MrwalkFunction · 0.85
TranMImprovwalkFunction · 0.85

Calls 14

MivAbsMaxFunction · 0.85
test_w_in_ConeCCFunction · 0.85
MivAbsMaxArgFunction · 0.85
MivSubFunction · 0.85
MExpPolFunction · 0.85
MivDotProductFunction · 0.85
cancelFunction · 0.85
ivCopyFunction · 0.85
ivStringFunction · 0.85
PrintSFunction · 0.85
rCompleteFunction · 0.85
p_SetmFunction · 0.85

Tested by

no test coverage detected