Changeset 386517 in git


Ignore:
Timestamp:
Sep 28, 2016, 1:05:17 PM (8 years ago)
Author:
Andreas Steenpass <steenpass@…>
Branches:
(u'fieker-DuVal', '117eb8c30fc9e991c4decca4832b1d19036c4c65')(u'spielwiese', 'b4f17ed1d25f93d46dbe29e4b499baecc2fd51bb')
Children:
57619d3c1fbf5786d4b190e43ff6ca3595ad0082
Parents:
636703c69aef54d3171f4ee6279f0511f0d433cf
git-author:
Andreas Steenpass <steenpass@mathematik.uni-kl.de>2016-09-28 13:05:17+02:00
git-committer:
Andreas Steenpass <steenpass@mathematik.uni-kl.de>2017-12-15 12:17:07+01:00
Message:
chg: rename CReducersHash to lts_hash
File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/GBEngine/syz4.cc

    r636703 r386517  
    1818    poly lt;
    1919    unsigned long sev;
    20     unsigned int label;
    21 } CLeadingTerm_struct;
    22 
    23 typedef std::vector<const CLeadingTerm_struct*> TReducers_test;
    24 typedef std::map<long, TReducers_test> CReducersHash_test;
    25 
    26 static void initialize(CReducersHash_test &C, const ideal L)
     20    unsigned int comp;
     21} lt_struct;
     22
     23typedef std::vector<const lt_struct*> lts_vector;
     24typedef std::map<long, lts_vector> lts_hash;
     25
     26static void initialize(lts_hash &C, const ideal L)
    2727{
    2828  if( L != NULL )
     
    3434      if( a != NULL )
    3535      {
    36         CLeadingTerm_struct *CLT
    37             = (CLeadingTerm_struct*)omalloc(sizeof(CLeadingTerm_struct));
     36        lt_struct *CLT = (lt_struct*)omalloc(sizeof(lt_struct));
    3837        CLT->lt = a;
    3938        CLT->sev = p_GetShortExpVector(a, R);
    40         CLT->label = k;
     39        CLT->comp = k;
    4140        C[p_GetComp(a, R)].push_back( CLT );
    4241      }
     
    4544}
    4645
    47 static void deleteCRH(CReducersHash_test *C)
    48 {
    49     for (CReducersHash_test::iterator it = C->begin(); it != C->end(); it++) {
    50         TReducers_test& v = it->second;
    51         for (TReducers_test::const_iterator vit = v.begin(); vit != v.end();
    52             vit++) {
    53             omfree(const_cast<CLeadingTerm_struct*>(*vit));
     46static void deleteCRH(lts_hash *C)
     47{
     48    for (lts_hash::iterator it = C->begin(); it != C->end(); it++) {
     49        lts_vector& v = it->second;
     50        for (lts_vector::const_iterator vit = v.begin(); vit != v.end();
     51                vit++) {
     52            omfree(const_cast<lt_struct*>(*vit));
    5453        }
    5554        v.erase(v.begin(), v.end());
     
    5857}
    5958
    60 bool IsDivisible(const CReducersHash_test *C, const poly product)
    61 {
    62     CReducersHash_test::const_iterator m_itr
    63         = C->find(p_GetComp(product, currRing));
     59bool IsDivisible(const lts_hash *C, const poly product)
     60{
     61    lts_hash::const_iterator m_itr = C->find(p_GetComp(product, currRing));
    6462    if (m_itr == C->end()) {
    6563        return false;
    6664    }
    67     TReducers_test::const_iterator m_current = (m_itr->second).begin();
    68     TReducers_test::const_iterator m_finish  = (m_itr->second).end();
     65    lts_vector::const_iterator m_current = (m_itr->second).begin();
     66    lts_vector::const_iterator m_finish  = (m_itr->second).end();
    6967    const unsigned long m_not_sev = ~p_GetShortExpVector(product, currRing);
    7068    for ( ; m_current != m_finish; ++m_current) {
     
    7977static poly TraverseTail_test(poly multiplier, const int tail,
    8078   const ideal previous_module, const std::vector<bool> &variables,
    81    const CReducersHash_test *m_div, const CReducersHash_test *m_checker);
     79   const lts_hash *m_div, const lts_hash *m_checker);
    8280static poly ComputeImage_test(poly multiplier, const int tail,
    8381    const ideal previous_module, const std::vector<bool> &variables,
    84     const CReducersHash_test *m_div, const CReducersHash_test *m_checker);
     82    const lts_hash *m_div, const lts_hash *m_checker);
    8583static inline poly ReduceTerm_test(poly multiplier, poly term4reduction,
    8684    poly syztermCheck, const ideal previous_module,
    87     const std::vector<bool> &variables, const CReducersHash_test *m_div,
    88     const CReducersHash_test *m_checker);
     85    const std::vector<bool> &variables, const lts_hash *m_div,
     86    const lts_hash *m_checker);
    8987static poly leadmonom_test(const poly p, const ring r, const bool bSetZeroComp = true);
    9088
     
    122120
    123121static poly TraverseNF_test(const poly a, const ideal previous_module,
    124     const std::vector<bool> &variables, const CReducersHash_test *m_div,
    125     const CReducersHash_test *m_checker)
     122    const std::vector<bool> &variables, const lts_hash *m_div,
     123    const lts_hash *m_checker)
    126124{
    127125  const ring R = currRing;
     
    201199static poly TraverseTail_test(poly multiplier, const int tail,
    202200    const ideal previous_module, const std::vector<bool> &variables,
    203     const CReducersHash_test *m_div, const CReducersHash_test *m_checker)
     201    const lts_hash *m_div, const lts_hash *m_checker)
    204202{
    205203  const ring& r = currRing;
     
    264262static poly ComputeImage_test(poly multiplier, const int t,
    265263    const ideal previous_module, const std::vector<bool> &variables,
    266     const CReducersHash_test *m_div, const CReducersHash_test *m_checker)
     264    const lts_hash *m_div, const lts_hash *m_checker)
    267265{
    268266  const poly tail = previous_module->m[t]->next;
     
    341339
    342340poly FindReducer(const poly multiplier, const poly t, const poly syzterm,
    343     const CReducersHash_test *syz_checker, const CReducersHash_test *m_div)
     341    const lts_hash *syz_checker, const lts_hash *m_div)
    344342{
    345343  const ring r = currRing;
    346   CReducersHash_test::const_iterator m_itr
    347       = m_div->find(p_GetComp(t, currRing));
     344  lts_hash::const_iterator m_itr = m_div->find(p_GetComp(t, currRing));
    348345  if (m_itr == m_div->end()) {
    349346    return NULL;
    350347  }
    351   TReducers_test::const_iterator m_current = (m_itr->second).begin();
    352   TReducers_test::const_iterator m_finish  = (m_itr->second).end();
     348  lts_vector::const_iterator m_current = (m_itr->second).begin();
     349  lts_vector::const_iterator m_finish  = (m_itr->second).end();
    353350  if (m_current == m_finish) {
    354351    return NULL;
     
    363360    }
    364361    const poly p = (*m_current)->lt;
    365     const int k  = (*m_current)->label;
     362    const int k  = (*m_current)->comp;
    366363    p_ExpVectorSum(q, multiplier, t, r); // q == product == multiplier * t
    367364    p_ExpVectorDiff(q, q, p, r); // (LM(product) / LM(L[k]))
     
    386383static inline poly ReduceTerm_test(poly multiplier, poly term4reduction,
    387384    poly syztermCheck, const ideal previous_module,
    388     const std::vector<bool> &variables, const CReducersHash_test *m_div,
    389     const CReducersHash_test *m_checker)
     385    const std::vector<bool> &variables, const lts_hash *m_div,
     386    const lts_hash *m_checker)
    390387{
    391388  const ring r = currRing;
     
    580577
    581578static void computeLiftings(const resolvente res, const int index,
    582     std::vector<bool> &variables, CReducersHash_test *&hash_previous_module)
     579    std::vector<bool> &variables, lts_hash *&hash_previous_module)
    583580{
    584581    update_variables(variables, res[index-1]);
    585     CReducersHash_test *hash_current_module = new CReducersHash_test();
     582    lts_hash *hash_current_module = new lts_hash();
    586583    initialize(*hash_current_module, res[index]);
    587584    poly p;
     
    611608        std::vector<bool> variables;
    612609        variables.resize(currRing->N, true);
    613         CReducersHash_test *hash_previous_module = new CReducersHash_test();
     610        lts_hash *hash_previous_module = new lts_hash();
    614611        initialize(*hash_previous_module, res[index-1]);
    615612        while (!idIs0(res[index])) {
Note: See TracChangeset for help on using the changeset viewer.