Changeset cdd38f in git


Ignore:
Timestamp:
Aug 22, 2008, 11:01:19 AM (15 years ago)
Author:
Hans Schönemann <hannes@…>
Branches:
(u'spielwiese', '828514cf6e480e4bafc26df99217bf2a1ed1ef45')
Children:
ed0d3c884cb3d290762c61e585627ce1f0c18f60
Parents:
c51e4a10429f5e0dc652e64d47621b06986328ad
Message:
*hannes: kernel cmd


git-svn-id: file:///usr/local/Singular/svn/trunk@11023 2c84dea3-7e68-4137-9b89-c4e89433aadc
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • Singular/iparith.cc

    rc51e4a rcdd38f  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: iparith.cc,v 1.477 2008-08-18 10:41:46 Singular Exp $ */
     4/* $Id: iparith.cc,v 1.478 2008-08-22 09:01:18 Singular Exp $ */
    55
    66/*
     
    283283  { "kbase",       0, KBASE_CMD ,         CMD_12},
    284284  { "keepring",    0, KEEPRING_CMD ,      KEEPRING_CMD},
     285  { "kernel",      0, KERNEL_CMD ,        CMD_2},
    285286  { "kill",        0, KILL_CMD ,          KILL_CMD},
    286287  { "killattrib",  0, KILLATTR_CMD ,      CMD_12},
     
    23232324                              (ideal)(u->Data()),currQuotient);
    23242325  return FALSE;
     2326}
     2327static BOOLEAN jjPREIMAGE(leftv res, leftv u, leftv v, leftv w);
     2328static BOOLEAN jjKERNEL(leftv res, leftv u, leftv v)
     2329{
     2330  return jjPREIMAGE(res,u,v,NULL);
    23252331}
    23262332static BOOLEAN jjKoszul(leftv res, leftv u, leftv v)
     
    33493355,{jjKBASE2,    KBASE_CMD,      IDEAL_CMD,      IDEAL_CMD,  INT_CMD ALLOW_PLURAL}
    33503356,{jjKBASE2,    KBASE_CMD,      MODUL_CMD,      MODUL_CMD,  INT_CMD ALLOW_PLURAL}
     3357,{jjKERNEL,    KERNEL_CMD,     IDEAL_CMD, RING_CMD,        ANY_TYPE ALLOW_PLURAL}
     3358,{jjKERNEL,    KERNEL_CMD,     IDEAL_CMD, QRING_CMD,       ANY_TYPE ALLOW_PLURAL}
    33513359,{atKILLATTR2, KILLATTR_CMD,   NONE,           IDHDL,      STRING_CMD ALLOW_PLURAL}
    33523360,{jjKoszul,    KOSZUL_CMD,     MATRIX_CMD,     INT_CMD,    INT_CMD NO_PLURAL}
     
    56285636static BOOLEAN jjPREIMAGE(leftv res, leftv u, leftv v, leftv w)
    56295637{
     5638  // handles preimage(r,phi,i) and kernel(r,phi)
    56305639  idhdl h;
    56315640  ring rr;
    56325641  map mapping;
    5633 
    5634   if ((v->name==NULL) || (w->name==NULL))
     5642  BOOLEAN kernel_cmd= (iiOp==KERNEL_CMD);
     5643
     5644  if ((v->name==NULL) || (!kernel_cmd && (w->name==NULL)))
    56355645  {
    56365646    WerrorS("2nd/3rd arguments must have names");
     
    56675677    return TRUE;
    56685678  }
    5669   if ((h=rr->idroot->get(w->name,myynest))!=NULL)
    5670   {
    5671     if (h->typ==IDEAL_CMD)
    5672     {
    5673       if (((currRing->qideal!=NULL) && (pOrdSgn==-1))
    5674       || ((rr->qideal!=NULL) && (rr->OrdSgn==-1)))
    5675       {
    5676         WarnS("preimage in local qring may be wrong: use Ring::preimageLoc instead");
    5677       }
    5678       res->data=(char *)maGetPreimage(rr,mapping,IDIDEAL(h));
    5679       if (res->data==NULL/* is of type ideal, should not be NULL*/) return TRUE;
     5679  ideal image;
     5680  if (kernel_cmd) image=idInit(1,1);
     5681  else
     5682  {
     5683    if ((h=rr->idroot->get(w->name,myynest))!=NULL)
     5684    {
     5685      if (h->typ==IDEAL_CMD)
     5686      {
     5687        image=IDIDEAL(h);
     5688      }
     5689      else
     5690      {
     5691        Werror("`%s` is no ideal",IDID(h));
     5692        return TRUE;
     5693      }
    56805694    }
    56815695    else
    56825696    {
    5683       Werror("`%s` is no ideal",IDID(h));
     5697      Werror("`%s` is not defined in `%s`",w->name,ring_name);
    56845698      return TRUE;
    56855699    }
    56865700  }
    5687   else
    5688   {
    5689     Werror("`%s` is not defined in `%s`",w->name,ring_name);
    5690     return TRUE;
    5691   }
    5692   return FALSE;
     5701  if (((currRing->qideal!=NULL) && (pOrdSgn==-1))
     5702  || ((rr->qideal!=NULL) && (rr->OrdSgn==-1)))
     5703  {
     5704    WarnS("preimage in local qring may be wrong: use Ring::preimageLoc instead");
     5705  }
     5706  res->data=(char *)maGetPreimage(rr,mapping,image);
     5707  if (kernel_cmd) idDelete(&image);
     5708  return (res->data==NULL/* is of type ideal, should not be NULL*/);
    56935709}
    56945710static BOOLEAN jjRANDOM_Im(leftv res, leftv u, leftv v, leftv w)
  • Singular/tok.h

    rc51e4a rcdd38f  
    77* ABSTRACT: tokens, types for interpreter; general macros
    88*/
    9 /* $Id: tok.h,v 1.69 2008-01-22 09:40:03 Singular Exp $ */
     9/* $Id: tok.h,v 1.70 2008-08-22 09:01:18 Singular Exp $ */
    1010
    1111#ifndef MYYSTYPE
     
    8989  IS_RINGVAR,
    9090  JANET_CMD,
     91  KERNEL_CMD,
    9192  KILLATTR_CMD,
    9293  KRES_CMD,
  • doc/NEWS.texi

    rc51e4a rcdd38f  
    11@comment -*-texinfo-*-
    2 @comment $Id: NEWS.texi,v 1.102 2008-08-19 18:04:02 Singular Exp $
     2@comment $Id: NEWS.texi,v 1.103 2008-08-22 09:01:19 Singular Exp $
    33@comment this file contains the News about Singular versions
    44@comment Unix
     
    3333@itemize @bullet
    3434@item
     35new command: kernel (@nref{kernel})
     36@item
    3537new command: sqrfree (@nref{sqrfree})
    3638@item
     
    4042
    4143@heading Internal Changes
    42 @table @bullet
     44@itemize @bullet
    4345@item new build target: libsingular.a (for gfan etc.)
    4446@item code variants depend now on CPU typ, not OS
    4547@item better test for builtin limits (@nref{Limitations})
    46 @end table
     48@end itemize
    4749
    4850@heading New @sc{Singular} libraries
Note: See TracChangeset for help on using the changeset viewer.