Changeset bc91a6 in git


Ignore:
Timestamp:
Mar 31, 2003, 2:29:03 PM (21 years ago)
Author:
Hans Schönemann <hannes@…>
Branches:
(u'spielwiese', '17f1d200f27c5bd38f5dfc6e8a0879242279d1d8')
Children:
239c77eb775c22caeb0ee9c5299cb3e6fd4fd94c
Parents:
f9fedbcff3a1a4997cf841a058757b252364ce20
Message:
*hannes: subst(...poly) from 2-0


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

Legend:

Unmodified
Added
Removed
  • Singular/iparith.cc

    rf9fedb rbc91a6  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: iparith.cc,v 1.293 2003-03-28 10:50:38 Singular Exp $ */
     4/* $Id: iparith.cc,v 1.294 2003-03-31 12:27:00 Singular Exp $ */
    55
    66/*
     
    43574357{
    43584358  monomexpr=(poly)w->Data();
     4359  #if 0
    43594360  if (pLength(monomexpr)>1)
    43604361  {
     
    43634364    return TRUE;
    43644365  }
     4366  #endif
    43654367  if (!(ringvar=pVar((poly)v->Data())))
    43664368  {
     
    43764378  BOOLEAN nok=jjSUBST_Test(v,w,ringvar,monomexpr);
    43774379  if (nok) return TRUE;
    4378   res->data = pSubst((poly)u->CopyD(res->rtyp),ringvar,monomexpr);
     4380  if ((monomexpr==NULL)||(pNext(monomexpr)==NULL))
     4381    res->data = pSubst((poly)u->CopyD(res->rtyp),ringvar,monomexpr);
     4382  else
     4383    res->data = idSubstPoly((ideal)u->Data(),ringvar,monomexpr);
    43794384  return FALSE;
    43804385}
     
    43854390  BOOLEAN nok=jjSUBST_Test(v,w,ringvar,monomexpr);
    43864391  if (nok) return TRUE;
    4387   res->data = idSubst((ideal)u->CopyD(res->rtyp),ringvar,monomexpr);
     4392  if ((monomexpr==NULL)||(pNext(monomexpr)==NULL))
     4393    res->data = idSubst((ideal)u->CopyD(res->rtyp),ringvar,monomexpr);
     4394  else
     4395    res->data = idSubstPoly((ideal)u->Data(),ringvar,monomexpr);
    43884396  return FALSE;
    43894397}
  • Singular/maps.cc

    rf9fedb rbc91a6  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: maps.cc,v 1.40 2003-03-12 12:27:42 Singular Exp $ */
     4/* $Id: maps.cc,v 1.41 2003-03-31 12:26:39 Singular Exp $ */
    55/*
    66* ABSTRACT - the mapping of polynomials to other rings
     
    672672}
    673673
     674/*2
     675* substitutes the variable var (from 1..N) by image,
     676* does not destroy p and  image
     677*/
    674678poly pSubstPoly(poly p, int var, poly image)
    675679{
     
    696700}
    697701
     702/*2
     703* substitute the n-th variable by the poly e in id
     704* does not destroy id and e
     705*/
     706ideal  idSubstPoly(ideal id, int n, poly e)
     707{
     708  int k=MATROWS((matrix)id)*MATCOLS((matrix)id);
     709  ideal res=(ideal)mpNew(MATROWS((matrix)id),MATCOLS((matrix)id));
     710
     711  res->rank = id->rank;
     712  for(k--;k>=0;k--)
     713  {
     714    res->m[k]=pSubstPoly(id->m[k],n,e);
     715  }
     716  return res;
     717}
  • Singular/maps.h

    rf9fedb rbc91a6  
    44*  Computer Algebra System SINGULAR     *
    55****************************************/
    6 /* $Id: maps.h,v 1.10 2002-03-07 18:48:58 Singular Exp $ */
     6/* $Id: maps.h,v 1.11 2003-03-31 12:26:39 Singular Exp $ */
    77/*
    88* ABSTRACT - the mapping of polynomials to other rings
     
    2424                int * perm, int *par_perm, int ch);
    2525poly pSubstPoly(poly p, int var, poly image);
     26ideal  idSubstPoly(ideal id, int n, poly e);
    2627#endif
Note: See TracChangeset for help on using the changeset viewer.