Changeset ec9b96 in git for Singular/LIB/center.lib


Ignore:
Timestamp:
May 11, 2006, 8:53:25 PM (18 years ago)
Author:
Motsak Oleksandr <motsak@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
c4224163d0b5a68d0df32d84c36aa034616eeb0c
Parents:
ab9844937566dae9f75927a6ac2989457ff9e881
Message:
!: found&fixed a bug: mindeg of ideal is intmat => mindegInt


git-svn-id: file:///usr/local/Singular/svn/trunk@9129 2c84dea3-7e68-4137-9b89-c4e89433aadc
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Singular/LIB/center.lib

    rab9844 rec9b96  
    11///////////////////////////////////////////////////////////////////////////////
    2 version="$Id: center.lib,v 1.19 2006-05-05 14:36:12 motsak Exp $"
     2version="$Id: center.lib,v 1.20 2006-05-11 18:53:25 motsak Exp $"
    33category="Noncommutative"
    44info="
     
    10581058  int m = (k > 0);
    10591059       
    1060   int MinDeg = 6; // starting guess for Maximal Bounding Degree, 6
    1061   int Delta  = 4; // increment of it, 4
     1060  int @MinDeg = 1; // starting guess for Maximal Bounding Degree, 6
     1061  int @Delta  = 1; // increment of it, 4
    10621062       
    10631063  if( m and (D <= 0) )
    10641064    {
    10651065      // minimal guess
    1066       D = MinDeg;
     1066      D = @MinDeg;
    10671067    }
    10681068   
     
    12071207
    12081208          // Init new grades:
    1209           for( j = D + 1; j <= (D + Delta); j++ )
     1209          for( j = D + 1; j <= (D + @Delta); j++ )
    12101210            {
    12111211              FOUND_LEADING_MONOMIALS[j] = ideal();
     
    12251225            {
    12261226              // minimal degree:
    1227               d = mindeg(FLM); 
     1227              d = mindegInt(FLM);  /// ### ///
    12281228               
    12291229              // take all of minimal degree:               
     
    12331233               
    12341234              // Add them in the same way:
    1235               for( j = 1; j <= (D + Delta); j = j + d ) // For every degree (j*d) of T, do:
     1235              for( j = 1; j <= (D + @Delta); j = j + d ) // For every degree (j*d) of T, do:
    12361236                {           
    1237                   for( l = j; (l + d) <= (D + Delta); l++ )
     1237                  for( l = j; (l + d) <= (D + @Delta); l++ )
    12381238                    {
    12391239                      if( (l + d) > D ) // Only new should be updated!
     
    12591259          setring NCRING;
    12601260
     1261/*
     1262    if(toprint())
     1263    {
     1264      typeof(@Delta); @Delta;
     1265      typeof(D); D;
     1266    };
     1267*/   
    12611268          // And set new Bound
    1262           D = D + Delta;
     1269          D = D + @Delta;
    12631270        }
    12641271               
     
    14211428  while( size(q) > 0 )
    14221429    {
    1423       d = maxdeg(p);
     1430      d = maxdegInt(p); /// ### ///
    14241431       
    14251432      if( (0 < d) and (d <= N) )
     
    14821489}
    14831490
     1491
     1492/******************************************************/
     1493static proc mindegInt( ideal I )
     1494{   
     1495  /*4DEBUG*/    if( defined( @@@DEBUG ) ){ BCall( "mindegInt", I ); }; /*4DEBUG*/
     1496
     1497  intmat D = mindeg(I);
     1498   
     1499  int min = D[1, 1]; int m;
     1500   
     1501  for( int c = 2; c <= ncols(D); c++ )
     1502    {
     1503      m = D[1, c];
     1504       
     1505      if( m < min )
     1506        {
     1507          min = m;
     1508        }
     1509    }
     1510   
     1511  /*4DEBUG*/    if( defined( @@@DEBUG ) ){ ECall( "mindegInt", min ); }; /*4DEBUG*/
     1512
     1513  return( min );   
     1514}
     1515
    14841516/******************************************************/
    14851517proc sa_reduce( ideal V ) // 'subalgebra basis' computation
     
    15401572      FLM[1] = 0; // ...and kill it from FLM
    15411573       
    1542       d = maxdeg( p );
     1574      d = maxdegInt( p );
    15431575      T = ideal(p);
    15441576       
     
    16521684      FLM[1] = 0; // ...and kill it from FLM
    16531685       
    1654       d = maxdeg(q);
     1686      d = maxdegInt(q);
    16551687      T = ideal(q);
    16561688       
Note: See TracChangeset for help on using the changeset viewer.