Changeset 1717fb in git


Ignore:
Timestamp:
Sep 30, 2016, 4:20:27 PM (7 years ago)
Author:
Andreas Steenpass <steenpass@…>
Branches:
(u'spielwiese', '5b153614cbc72bfa198d75b1e9e33dab2645d9fe')
Children:
2204eaa35cbca2d78f6bf1d279772af59dfd569a
Parents:
576ba764dd5476f1e8a81f625c5a1a23fb0485da
git-author:
Andreas Steenpass <steenpass@mathematik.uni-kl.de>2016-09-30 16:20:27+02:00
git-committer:
Andreas Steenpass <steenpass@mathematik.uni-kl.de>2017-12-15 12:17:07+01:00
Message:
chg: rename TraverseNF_test() to lift_ext_LT()
File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/GBEngine/syz4.cc

    r576ba7 r1717fb  
    316316}
    317317
    318 static poly TraverseNF_test(const poly a, const ideal previous_module,
     318static poly lift_ext_LT(const poly a, const ideal previous_module,
    319319    const std::vector<bool> &variables, const lts_hash *m_div,
    320320    const lts_hash *m_checker)
    321321{
    322322  const ring R = currRing;
    323   const int r = p_GetComp(a, R) - 1;
    324   poly t = TraverseTail_test(a, r, previous_module, variables, m_div,
    325       m_checker);
    326   if (check_variables(variables, a)) {
    327     t = p_Add_q(t, ReduceTerm_test(a, previous_module->m[r], a,
    328         previous_module, variables, m_div, m_checker), R);
    329   }
    330   return t;
     323  poly t1 = TraverseTail_test(a, p_GetComp(a, R)-1,
     324      previous_module, variables, m_div, m_checker);
     325  poly t2 = TraverseTail_test(a->next, p_GetComp(a->next, R)-1,
     326      previous_module, variables, m_div, m_checker);
     327  t1 = p_Add_q(t1, t2, R);
     328  return t1;
    331329}
    332330
     
    510508    lts_hash *hash_current_module = new lts_hash();
    511509    initialize_lts_hash(*hash_current_module, res[index]);
    512     poly p;
    513510    for (int j = res[index]->ncols-1; j >= 0; j--) {
    514         p = res[index]->m[j];
    515         pDelete(&res[index]->m[j]->next);
    516         p->next = NULL;
    517         res[index]->m[j]->next = TraverseNF_test(p, res[index-1], variables,
    518             hash_previous_module, hash_current_module);
     511        res[index]->m[j]->next->next = lift_ext_LT(res[index]->m[j],
     512            res[index-1], variables, hash_previous_module,
     513            hash_current_module);
    519514    }
    520515    delete_lts_hash(hash_previous_module);
     
    563558}
    564559
    565 static void insert_induced_LTs(const resolvente res, const int length)
    566 {
    567     const ring r = currRing;
     560#define insert_first_term(r, p, q, R)                             \
     561do                                                                \
     562{                                                                 \
     563    p = r;                                                        \
     564    q = p->next;                                                  \
     565    if (p_LmCmp(p, q, R) != 1) {                                  \
     566        while (q->next != NULL && p_LmCmp(p, q->next, R) == -1) { \
     567            pIter(q);                                             \
     568        }                                                         \
     569        r = p->next;                                              \
     570        p->next = q->next;                                        \
     571        q->next = p;                                              \
     572    }                                                             \
     573}                                                                 \
     574while (0)
     575
     576static void insert_ext_induced_LTs(const resolvente res, const int length)
     577{
     578    const ring R = currRing;
    568579    poly p, q;
    569580    for (int i = length-2; i > 0; i--) {
    570581        for (int j = res[i]->ncols-1; j >= 0; j--) {
    571             p = res[i]->m[j];
    572             q = res[i]->m[j]->next;
    573             if (p_LmCmp(p, q, r) == 1) continue;
    574             while (q->next != NULL && p_LmCmp(p, q->next, r) == -1) pIter(q);
    575             res[i]->m[j] = p->next;
    576             p->next = q->next;
    577             q->next = p;
     582            insert_first_term(res[i]->m[j]->next, p, q, R);
     583            insert_first_term(res[i]->m[j], p, q, R);
    578584        }
    579585    }
     
    593599    }
    594600    length = computeResolution(res, length, syzHead);
    595     insert_induced_LTs(res, length);
     601    insert_ext_induced_LTs(res, length);
    596602    result->fullres = res;
    597603    result->length = length;
Note: See TracChangeset for help on using the changeset viewer.