Changeset 02c60e in git


Ignore:
Timestamp:
Oct 5, 2017, 7:29:32 PM (7 years ago)
Author:
Andreas Steenpass <steenpass@…>
Branches:
(u'spielwiese', '2a584933abf2a2d3082034c7586d38bb6de1a30a')
Children:
88148a1de1b5b71e266c95fd5fa98d9bba5edd6f
Parents:
2b968fa27bc9c56858aeeaf4cca475d621c80fc3
git-author:
Andreas Steenpass <steenpass@mathematik.uni-kl.de>2017-10-05 19:29:32+02:00
git-committer:
Andreas Steenpass <steenpass@mathematik.uni-kl.de>2017-12-15 12:17:07+01:00
Message:
chg: rename some functions and variables
File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/GBEngine/syz4.cc

    r2b968f r02c60e  
    7676#define delete_lts_hash(C) C->clear()
    7777
    78 poly FindReducer(const poly multiplier, const poly t, const lts_hash *m_div)
    79 {
    80     const ring r = currRing;
    81     lts_hash::const_iterator m_itr = m_div->find(p_GetComp(t, currRing));
    82     if (m_itr == m_div->end()) {
     78poly find_reducer(const poly multiplier, const poly t,
     79        const lts_hash *hash_previous_module)
     80{
     81    const ring r = currRing;
     82    lts_hash::const_iterator m_itr = hash_previous_module->find(p_GetComp(t,
     83                currRing));
     84    if (m_itr == hash_previous_module->end()) {
    8385        return NULL;
    8486    }
    8587    lts_vector::const_iterator m_current = (m_itr->second).begin();
    86     lts_vector::const_iterator m_finish  = (m_itr->second).end();
     88    lts_vector::const_iterator m_finish = (m_itr->second).end();
    8789    const poly q = p_New(r);
    8890    pNext(q) = NULL;
     
    106108}
    107109
    108 static poly TraverseTail_test(poly multiplier, const int tail,
     110static poly traverse_tail(poly multiplier, const int tail,
    109111        const ideal previous_module, const std::vector<bool> &variables,
    110         const lts_hash *m_div);
    111 
    112 static inline poly ReduceTerm_test(poly multiplier, poly term4reduction,
     112        const lts_hash *hash_previous_module);
     113
     114static inline poly reduce_term(poly multiplier, poly term4reduction,
    113115        const ideal previous_module, const std::vector<bool> &variables,
    114         const lts_hash *m_div)
    115 {
    116     const ring r = currRing;
    117     poly s = FindReducer(multiplier, term4reduction, m_div);
     116        const lts_hash *hash_previous_module)
     117{
     118    const ring r = currRing;
     119    poly s = find_reducer(multiplier, term4reduction, hash_previous_module);
    118120    if( s == NULL )
    119121    {
     
    121123    }
    122124    const int c = p_GetComp(s, r) - 1;
    123     const poly t = TraverseTail_test(s, c, previous_module, variables, m_div);
     125    const poly t = traverse_tail(s, c, previous_module, variables,
     126            hash_previous_module);
    124127    if( t != NULL )
    125128        s = p_Add_q(s, t, r);
     
    127130}
    128131
    129 static poly ComputeImage_test(poly multiplier, const int t,
     132static poly compute_image(poly multiplier, const int t,
    130133        const ideal previous_module, const std::vector<bool> &variables,
    131         const lts_hash *m_div)
     134        const lts_hash *hash_previous_module)
    132135{
    133136    const poly tail = previous_module->m[t]->next;
     
    141144        for(poly p = tail; p != NULL; p = pNext(p))   // iterate over the tail
    142145        {
    143             const poly rt = ReduceTerm_test(multiplier, p, previous_module,
    144                     variables, m_div);
     146            const poly rt = reduce_term(multiplier, p, previous_module,
     147                    variables, hash_previous_module);
    145148            sBucket_Add_p(sum, rt, pLength(rt));
    146149        }
     
    187190#endif   // CACHE
    188191
    189 static poly TraverseTail_test(poly multiplier, const int tail,
     192static poly traverse_tail(poly multiplier, const int tail,
    190193        const ideal previous_module, const std::vector<bool> &variables,
    191         const lts_hash *m_div)
     194        const lts_hash *hash_previous_module)
    192195{
    193196    const ring& r = currRing;
     
    212215            return p;
    213216        }
    214         const poly p = ComputeImage_test(multiplier, tail, previous_module,
    215                 variables, m_div);
     217        const poly p = compute_image(multiplier, tail, previous_module,
     218                variables, hash_previous_module);
    216219        itr = T.find(multiplier);
    217220        if( itr == T.end() )
     
    224227    }
    225228#endif   // CACHE
    226     const poly p = ComputeImage_test(multiplier, tail, previous_module,
    227             variables, m_div);
     229    const poly p = compute_image(multiplier, tail, previous_module, variables,
     230            hash_previous_module);
    228231#if CACHE
    229232    top_itr = m_cache_test.find(tail);
     
    251254
    252255static poly lift_ext_LT(const poly a, const ideal previous_module,
    253         const std::vector<bool> &variables, const lts_hash *m_div)
     256        const std::vector<bool> &variables,
     257        const lts_hash *hash_previous_module)
    254258{
    255259    const ring R = currRing;
    256     poly t1 = ComputeImage_test(a, p_GetComp(a, R)-1,
    257             previous_module, variables, m_div);
    258     poly t2 = TraverseTail_test(a->next, p_GetComp(a->next, R)-1,
    259             previous_module, variables, m_div);
     260    poly t1 = compute_image(a, p_GetComp(a, R)-1, previous_module, variables,
     261            hash_previous_module);
     262    poly t2 = traverse_tail(a->next, p_GetComp(a->next, R)-1, previous_module,
     263            variables, hash_previous_module);
    260264    t1 = p_Add_q(t1, t2, R);
    261265    return t1;
Note: See TracChangeset for help on using the changeset viewer.