Changeset c1d8f3e in git


Ignore:
Timestamp:
Aug 25, 2016, 6:01:32 PM (7 years ago)
Author:
Andreas Steenpass <steenpass@…>
Branches:
(u'spielwiese', '8d54773d6c9e2f1d2593a28bc68b7eeab54ed529')
Children:
a7e3139c235d2ec2c8be9bb6baef444e4df65332
Parents:
4c6e9d4ea46ef519f4c5e60541f5dbd83e8cc656
git-author:
Andreas Steenpass <steenpass@mathematik.uni-kl.de>2016-08-25 18:01:32+02:00
git-committer:
Andreas Steenpass <steenpass@mathematik.uni-kl.de>2017-12-15 12:17:07+01:00
Message:
fix: handle syStrategy->length correctly in fres()
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • Singular/iparith.cc

    r4c6e9d4 rc1d8f3e  
    22092209        return TRUE;
    22102210    }
    2211     maxl--;
    2212     if (maxl == -1) {
    2213         maxl = currRing->N;
     2211    if (maxl == 0) {
     2212        maxl = currRing->N+1;
    22142213        if (currRing->qideal != NULL) {
    22152214            Warn("full resolution in a qring may be infinite, "
    2216                 "setting max length to %d", maxl+1);
     2215                "setting max length to %d", maxl);
    22172216        }
    22182217    }
     
    22262225    syStrategy r;
    22272226    r = syFrank(id, maxl, method);
    2228     r->list_length = maxl+1;
     2227    r->list_length = maxl;
    22292228    if (r == NULL) return TRUE;
    22302229    assume( (r->minres != NULL) || (r->fullres != NULL) );
  • kernel/GBEngine/syz4.cc

    r4c6e9d4 rc1d8f3e  
    673673    const syzHeadFunction *syzHead)
    674674{
     675    int max_index = length-1;
    675676    int index = 0;
    676     if (!idIs0(res[index]) && index < length) {
     677    if (!idIs0(res[index]) && index < max_index) {
    677678        index++;
    678679        res[index] = computeFrame(res[index-1], syzM_i_unsorted, syzHead);
    679     }
    680     while (!idIs0(res[index]) && index < length) {
     680        while (!idIs0(res[index])) {
    681681#if 1
    682         computeLiftings(res, index);
    683         sortPolysTails(res, index);
     682            computeLiftings(res, index);
     683            sortPolysTails(res, index);
    684684#endif   // LIFT
    685         index++;
    686         res[index] = computeFrame(res[index-1], syzM_i_sorted, syzHead);
    687     }
    688     if (index < length) {
     685            if (index < max_index) {
     686                index++;
     687                res[index] = computeFrame(res[index-1], syzM_i_sorted,
     688                    syzHead);
     689            }
     690            else {
     691                break;
     692            }
     693        }
     694    }
     695    max_index = index+1;
     696    if (max_index < length) {
    689697        res = (resolvente)omReallocSize(res, (length+1)*sizeof(ideal),
    690             (index+1)*sizeof(ideal));
    691     }
    692     return index;
     698            (max_index+1)*sizeof(ideal));
     699    }
     700    return max_index;
    693701}
    694702
     
    696704{
    697705    const ring r = currRing;
    698     for (int i = length; i > 0; i--) {
     706    for (int i = length-1; i > 0; i--) {
    699707        for (int j = res[i]->ncols-1; j >= 0; j--) {
    700708            res[i]->m[j] = p_SortAdd(res[i]->m[j], r, TRUE);
     
    731739
    732740    result->fullres = res;
    733     result->length = length+1;
     741    result->length = length;
    734742    return result;
    735743}
Note: See TracChangeset for help on using the changeset viewer.