Changeset 57619d3 in git


Ignore:
Timestamp:
Sep 29, 2016, 10:47:10 AM (8 years ago)
Author:
Andreas Steenpass <steenpass@…>
Branches:
(u'spielwiese', '17f1d200f27c5bd38f5dfc6e8a0879242279d1d8')
Children:
1370537d70de0c592ab2af885f12372ef48e4704
Parents:
3865177709f92bbb886a5bf1e8bfa2eebbacf683
git-author:
Andreas Steenpass <steenpass@mathematik.uni-kl.de>2016-09-29 10:47:10+02:00
git-committer:
Andreas Steenpass <steenpass@mathematik.uni-kl.de>2017-12-15 12:17:07+01:00
Message:
chg: make elements of lts_vector non-pointers
File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/GBEngine/syz4.cc

    r386517 r57619d3  
    2121} lt_struct;
    2222
    23 typedef std::vector<const lt_struct*> lts_vector;
     23typedef std::vector<lt_struct> lts_vector;
    2424typedef std::map<long, lts_vector> lts_hash;
    2525
     
    3434      if( a != NULL )
    3535      {
    36         lt_struct *CLT = (lt_struct*)omalloc(sizeof(lt_struct));
    37         CLT->lt = a;
    38         CLT->sev = p_GetShortExpVector(a, R);
    39         CLT->comp = k;
    40         C[p_GetComp(a, R)].push_back( CLT );
     36        C[p_GetComp(a, R)].push_back({a, p_GetShortExpVector(a, R),
     37            (unsigned int)k});
    4138      }
    4239    }
     
    4845    for (lts_hash::iterator it = C->begin(); it != C->end(); it++) {
    4946        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));
    53         }
    5447        v.erase(v.begin(), v.end());
    5548    }
     
    6760    const unsigned long m_not_sev = ~p_GetShortExpVector(product, currRing);
    6861    for ( ; m_current != m_finish; ++m_current) {
    69         if (p_LmShortDivisibleByNoComp((*m_current)->lt, (*m_current)->sev,
     62        if (p_LmShortDivisibleByNoComp(m_current->lt, m_current->sev,
    7063            product, m_not_sev, currRing)) {
    7164            return true;
     
    355348  const unsigned long m_not_sev = ~p_GetShortExpVector(multiplier, t, r);
    356349  for( ; m_current != m_finish; ++m_current) {
    357     if ( ((*m_current)->sev & m_not_sev)
    358         || !(_p_LmDivisibleByNoComp((*m_current)->lt, multiplier, t, r))) {
     350    if ( (m_current->sev & m_not_sev)
     351        || !(_p_LmDivisibleByNoComp(m_current->lt, multiplier, t, r))) {
    359352      continue;
    360353    }
    361     const poly p = (*m_current)->lt;
    362     const int k  = (*m_current)->comp;
     354    const poly p = m_current->lt;
     355    const int k  = m_current->comp;
    363356    p_ExpVectorSum(q, multiplier, t, r); // q == product == multiplier * t
    364357    p_ExpVectorDiff(q, q, p, r); // (LM(product) / LM(L[k]))
Note: See TracChangeset for help on using the changeset viewer.