Changeset f0aec5 in git


Ignore:
Timestamp:
May 15, 2008, 7:31:04 PM (15 years ago)
Author:
Motsak Oleksandr <motsak@…>
Branches:
(u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', 'a800fe4b3e9d37a38c5a10cc0ae9dfa0c15a4ee6')
Children:
6918d657afe23f44f8cf07051a161481707bfdd4
Parents:
06879b7d7091f46b683a5e4267de4e3edc1ab70f
Message:
*motsak: internal interface to NC subsystem:
   system("ForceSCA", b, e) forces current NC-ring (!) to be internally SCA with anti-comm. vars.: [var(b)..var(e)] (no checks)
   system("NCGetType") internal NCRingType of current ring
   system("NCUseExtensions"[, b]) - get/set status of NC-Extensions Usage


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

Legend:

Unmodified
Added
Removed
  • Singular/extra.cc

    r06879b7 rf0aec5  
    22*  Computer Algebra System SINGULAR      *
    33*****************************************/
    4 /* $Id: extra.cc,v 1.268 2008-05-05 12:13:10 Singular Exp $ */
     4/* $Id: extra.cc,v 1.269 2008-05-15 17:31:04 motsak Exp $ */
    55/*
    66* ABSTRACT: general interface to internals of Singular ("system" command)
     
    226226    }
    227227    else
     228
     229
     230
     231
    228232/*==================== gen ==================================*/
    229233    if(strcmp(sys_cmd,"gen")==0)
     
    774778      return FALSE;
    775779    }
     780    if(strcmp(sys_cmd,"NCUseExtensions")==0)
     781    {
     782      extern bool bUseExtensions;
     783      res->rtyp=INT_CMD;
     784      res->data=(void *)bUseExtensions;
     785     
     786      if ((h!=NULL) && (h->Typ()==INT_CMD))
     787        bUseExtensions = (bool)((long)(h->Data()));
     788     
     789      return FALSE;
     790    }   
     791    if(strcmp(sys_cmd,"NCGetType")==0)
     792    {
     793      res->rtyp=INT_CMD;
     794     
     795      if( rIsPluralRing(currRing) )
     796        res->data=(void *)ncRingType(currRing);
     797      else
     798        res->data=(void *)(-1);
     799     
     800      return FALSE;
     801    }
     802
     803    if(strcmp(sys_cmd,"ForceSCA")==0)
     804    {
     805      if( !rIsPluralRing(currRing) )
     806        return TRUE;
     807
     808      int b, e;
     809     
     810      if ((h!=NULL) && (h->Typ()==INT_CMD))
     811      {
     812        b = (int)((long)(h->Data()));
     813        h=h->next;
     814      }
     815      else return TRUE;
     816 
     817      if ((h!=NULL) && (h->Typ()==INT_CMD))
     818      {
     819        e = (int)((long)(h->Data()));
     820      }
     821      else return TRUE;
     822
     823
     824      if( !sca_ForceCommutative( currRing, b, e ) )
     825        return TRUE;
     826
     827      return FALSE;
     828    }
     829
     830//    sca_ForceCommutative
     831   
    776832/*==================== PLURAL =================*/
    777833#if 0
Note: See TracChangeset for help on using the changeset viewer.