Changeset 10ea45f in git


Ignore:
Timestamp:
Jan 10, 2007, 6:17:27 PM (17 years ago)
Author:
Hans Schönemann <hannes@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
fdd5604bedc8353dc8e4d0431a01159bbb48053b
Parents:
97208806ca1fe3113b822ea4faecba0684b69601
Message:
*hannes: idCompatify changed


git-svn-id: file:///usr/local/Singular/svn/trunk@9679 2c84dea3-7e68-4137-9b89-c4e89433aadc
Location:
kernel
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • kernel/ideals.cc

    r972088 r10ea45f  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: ideals.cc,v 1.30 2007-01-10 10:42:00 Singular Exp $ */
     4/* $Id: ideals.cc,v 1.31 2007-01-10 17:17:27 Singular Exp $ */
    55/*
    66* ABSTRACT - all basic methods to manipulate ideals
     
    523523{
    524524  ideal result = idSimpleAdd(h1,h2);
    525   ideal tmp = idCompactify(result);
    526 
    527   idDelete(&result);
     525  idCompactify(result);
    528526  return tmp;
    529527}
     
    567565  }
    568566  {
    569     ideal tmp = idCompactify(hh);
    570     idDelete(&hh);
    571     return tmp;
    572     //return hh;
     567    idCompactify(hh);
     568    return hh;
    573569  }
    574570}
     
    25712567*skips all zeroes and double elements, searches also for units
    25722568*/
    2573 ideal idCompactify(ideal id)
     2569void idCompactify(ideal id)
    25742570{
    25752571  int i,j;
     
    25842580  if (b)
    25852581  {
    2586     ideal result=idInit(1,id->rank);
    2587     result->m[0]=pOne();
    2588     return result;
     2582    for(i=IDELEMS(id)-1;i>=0;i--) pDelete(&id->m[i]);
     2583    id->m[0]=pOne();
    25892584  }
    25902585  else
    25912586  {
    2592     ideal result=idCopy(id);
    2593     //if (IDELEMS(result) < 1)
    2594     {
    2595       for (i=1;i<IDELEMS(result);i++)
    2596       {
    2597         if (result->m[i]!=NULL)
    2598         {
    2599           for (j=0;j<i;j++)
    2600           {
    2601             if ((result->m[j]!=NULL)
    2602             && (pComparePolys(result->m[i],result->m[j])))
    2603             {
    2604               pDelete(&(result->m[j]));
    2605             }
    2606           }
    2607         }
    2608       }
    2609     }
    2610 //    else
    2611 //    {
    2612 //      intvec *v=idSort(result,TRUE);
    2613 //      for(i=0;i<IDELEMS(result);i++)
    2614 //        (*v)[i]--;
    2615 //      for (i=0;i<IDELEMS(result)-1;i++)
    2616 //      {
    2617 //        if (((*v)[i]>=0)
    2618 //        && (result->m[(*v)[i]]!=NULL))
    2619 //        {
    2620 //          j=i+1;
    2621 //          while ((j<IDELEMS(result))
    2622 //          && ((*v)[j]>=0)
    2623 //          && (result->m[(*v)[j]]!=NULL)
    2624 //          && (pComparePolys(result->m[(*v)[i]],result->m[(*v)[j]])))
    2625 //          {
    2626 //            pDelete(&(result->m[(*v)[j]]));
    2627 //            j++;
    2628 //          }
    2629 //        }
    2630 //      }
    2631 //      delete v;
    2632 //    }
    2633     idSkipZeroes(result);
    2634     return result;
     2587    idDelMultiples(id);
     2588    idSkipZeroes(id);
    26352589  }
    26362590}
  • kernel/ideals.h

    r972088 r10ea45f  
    44*  Computer Algebra System SINGULAR     *
    55****************************************/
    6 /* $Id: ideals.h,v 1.6 2006-12-15 17:16:07 Singular Exp $ */
     6/* $Id: ideals.h,v 1.7 2007-01-10 17:17:27 Singular Exp $ */
    77/*
    88* ABSTRACT - all basic methods to manipulate ideals
     
    113113ideal   idMinors(matrix a, int ar, ideal R=NULL);
    114114
    115 ideal   idCompactify(ideal id);
     115void   idCompactify(ideal id);
    116116
    117117ideal idMinEmbedding(ideal arg,BOOLEAN inPlace=FALSE, intvec **w=NULL);
  • kernel/tgb.cc

    r972088 r10ea45f  
    55*  Computer Algebra System SINGULAR     *
    66****************************************/
    7 /* $Id: tgb.cc,v 1.110 2007-01-10 10:56:45 bricken Exp $ */
     7/* $Id: tgb.cc,v 1.111 2007-01-10 17:17:27 Singular Exp $ */
    88/*
    99* ABSTRACT: slimgb and F4 implementation
     
    26112611  //if (debug_Ideal) PrintS("DebugIdeal received\n");
    26122612  // Print("Idelems %i \n----------\n",IDELEMS(arg_I));
    2613   ideal I=idCompactify(arg_I);
    2614    int i;
     2613  ideal I=idCopy(arg_I);
     2614  idCompactify(I);
    26152615  if (idIs0(I)) return I;
     2616  int i;
    26162617  for(i=0;i<IDELEMS(I);i++)
    26172618  {
Note: See TracChangeset for help on using the changeset viewer.