Changeset 210d1b in git for Singular/LIB/schreyer.lib


Ignore:
Timestamp:
May 30, 2012, 10:06:24 PM (12 years ago)
Author:
Oleksandr Motsak <motsak@…>
Branches:
(u'spielwiese', '5b153614cbc72bfa198d75b1e9e33dab2645d9fe')
Children:
d353e4f49eb4e1747ded689e6bdea5765a057c75
Parents:
33161fd92744b4c3b711de9f059b40511622d1c9
git-author:
Oleksandr Motsak <motsak@mathematik.uni-kl.de>2012-05-30 22:06:24+02:00
git-committer:
Oleksandr Motsak <motsak@mathematik.uni-kl.de>2014-05-07 04:41:44+02:00
Message:
fixing a Sort problem for 0-input (wrong output rank of 0?)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Singular/LIB/schreyer.lib

    r33161fd r210d1b  
    509509  }
    510510
    511   def @N = M; Sort_c_ds(@N);
    512  
    513   if( @KERCHECK )
    514   {
    515     def iv = sort(lead(M), "c,ds", 1)[2]; // ,1 => reversed! // TODO: not needed?
    516     def @M = M;
    517     @M = M[iv];
    518    
    519     // 0^th syz. property
    520     if(size(@N) * size(@M) > 0 )
    521     {
    522     if( size(module( matrix(module(matrix(@N))) - matrix(module(matrix(@M))) )) > 0 )
    523     {
    524       "@M:"; @M;
    525       "@N:"; @N;
    526 
    527       "module( matrix(@N) - matrix(@M) ): ";
    528       module( matrix(@N) - matrix(@M) );
    529 
    530       "ERROR: MySort: wrong sorting in 'MySort': @N != @M!!!";
    531       $
    532     }
    533     }
     511  def @N = M;
     512 
     513  if( size(M) > 0 )
     514  {
     515    Sort_c_ds(@N);
     516
     517    if( @KERCHECK )
     518    {
     519      def iv = sort(lead(M), "c,ds", 1)[2]; // ,1 => reversed! // TODO: not needed?
     520      def @M = M;
     521      @M = M[iv];
     522
     523      // 0^th syz. property
     524      if( (size(@N) + size(@M)) > 0 )
     525      {
     526        if( size(module( matrix(module(matrix(@N))) - matrix(module(matrix(@M))) )) > 0 )
     527        {
     528          "ERROR: MySort: wrong sorting in 'MySort': @N != @M!!!";
     529         
     530          "@M:"; @M;
     531          "@N:"; @N;
     532
     533          "module( matrix(module(matrix(@N))) - matrix(module(matrix(@M))) ): ";
     534          module( matrix(module(matrix(@N))) - matrix(module(matrix(@M))) );
     535
     536          "ERROR: MySort: wrong sorting in 'MySort': @N != @M!!!";
     537          $
     538        }
     539      }
     540    }
    534541  }
    535542
     
    879886    S = MySort(simplify(S, 2));
    880887
    881     if( size(S) * size(SS) > 0 )
     888    if( (size(S) + size(SS)) > 0 )
    882889    {
    883890    if( size(module(matrix(S) - matrix(SS))) > 0 )
Note: See TracChangeset for help on using the changeset viewer.