Changeset 645a19 in git for kernel/ideals.cc


Ignore:
Timestamp:
Jul 20, 2009, 2:01:13 PM (14 years ago)
Author:
Motsak Oleksandr <motsak@…>
Branches:
(u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', '00e2e9c41af3fde1273eb3633f4c0c7c3db2579d')
Children:
195b03db00f5e08ad6a891adcf3a7794a5dd00bf
Parents:
45c67dc7a3eec0097d1ad6ff5635d960cc089937
Message:
*motsak: deep kernel implementation of induced Schreyer ordering + helpers


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

Legend:

Unmodified
Added
Removed
  • kernel/ideals.cc

    r45c67dc r645a19  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: ideals.cc,v 1.74 2009-06-04 08:14:57 Singular Exp $ */
     4/* $Id: ideals.cc,v 1.75 2009-07-20 12:00:50 motsak Exp $ */
    55/*
    66* ABSTRACT - all basic methods to manipulate ideals
     
    99/* includes */
    1010#include "mod2.h"
     11
     12#ifndef NDEBUG
     13# define MYTEST 0
     14#else /* ifndef NDEBUG */
     15# define MYTEST 0
     16#endif /* ifndef NDEBUG */
     17
    1118#include "structs.h"
    1219#include "omalloc.h"
     
    2633
    2734
    28 #define MYTEST 0
    2935
    3036
     
    6672//#ifndef __OPTIMIZE__
    6773// this is mainly for outputting an ideal within the debugger
    68 void idShow(ideal id)
    69 {
     74void idShow(const ideal id, const ring lmRing, const ring tailRing, const int debugPrint)
     75{
     76  assume( debugPrint >= 0 );
     77 
    7078  if( id == NULL )
    7179    Print("(NULL)");
     
    7381  {
    7482    Print("Module of rank %ld,real rank %ld and %d generators.\n",
    75            id->rank,idRankFreeModule(id),IDELEMS(id));
    76     for (int i=0;i<id->ncols*id->nrows;i++)
    77     {
    78       if (id->m[i]!=NULL)
    79       {
    80         Print("generator %d: ",i);pWrite(id->m[i]);
    81       }
     83          id->rank,idRankFreeModule(id, lmRing, tailRing),IDELEMS(id));
     84
     85    int j = (id->ncols*id->nrows) - 1;
     86    while ((j > 0) && (id->m[j]==NULL)) j--;
     87    for (int i = 0; i <= j; i++)
     88    {
     89      Print("generator %d: ",i); p_DebugPrint(id->m[i], lmRing, tailRing, debugPrint);
    8290    }
    8391  }
     
    13231331  Print("Prepare::h2: ");
    13241332  idPrint(h2);
     1333
     1334  for(j=0;j<IDELEMS(h2);j++) pTest(h2->m[j]);
     1335
    13251336#endif
    13261337#endif
     
    13561367#endif
    13571368
     1369  idTest(h2);
    13581370
    13591371  h3 = kStd(h2,currQuotient,hom,w,NULL,syzcomp);
     1372
     1373#if MYTEST
     1374#ifdef RDEBUG
     1375  Print("Prepare::Output: ");
     1376  idPrint(h3);
     1377  for(j=0;j<IDELEMS(h2);j++) pTest(h3->m[j]);
     1378#endif
     1379#endif
     1380
     1381
    13601382  idDelete(&h2);
    13611383  return h3;
     
    13771399  int ii, idElemens_h1;
    13781400
     1401  assume(h1 != NULL);
     1402
    13791403  idElemens_h1=IDELEMS(h1);
    13801404#ifdef PDEBUG
     
    14121436  }
    14131437
    1414   ideal s_h3=idPrepare(s_h1,h,k,w);
     1438  idTest(s_h1);
     1439
     1440  ideal s_h3=idPrepare(s_h1,h,k,w); // main (syz) GB computation
    14151441
    14161442  if (s_h3==NULL)
     
    15891615#if MYTEST
    15901616#ifdef RDEBUG
    1591   Print("Input: ");
     1617  Print("idLiftStd Input: ");
    15921618  idPrint(s_h1);
    15931619#endif
     
    15991625#if MYTEST
    16001626#ifdef RDEBUG
    1601   Print("Prepare: ");
     1627  Print("idLiftStd Prepare: ");
    16021628  idPrint(s_h3);
    16031629#endif
     
    16081634#if MYTEST
    16091635#ifdef RDEBUG
    1610   Print("Temp: ");
     1636  Print("idLiftStd Temp: ");
    16111637  idPrint(s_h2);
    16121638#endif
     
    16461672#if MYTEST
    16471673#ifdef RDEBUG
    1648   Print("Input'': ");
     1674  Print("idLiftStd Input'': ");
    16491675  idPrint(s_h3);
    16501676#endif
     
    16561682#if MYTEST
    16571683#ifdef RDEBUG
    1658   Print("Temp Result: ");
     1684  Print("idLiftStd Temp Result: ");
    16591685  idPrint(s_h2);
    16601686#endif
     
    17011727#if MYTEST
    17021728#ifdef RDEBUG
    1703   Print("Output STD Ideal: ");
     1729  Print("idLiftStd Output STD Ideal: ");
    17041730  idPrint(s_h3);
    17051731
    1706   Print("Output Matrix: ");
     1732  Print("idLiftStd Output Matrix: ");
    17071733  iiWriteMatrix(*ma, "ma", 2, 4);
    17081734#endif
Note: See TracChangeset for help on using the changeset viewer.