Changeset 326434 in git


Ignore:
Timestamp:
Aug 7, 2008, 11:15:56 PM (15 years ago)
Author:
Viktor Levandovskyy <levandov@…>
Branches:
(u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', 'a657104b677b4c461d018cbf3204d72d34ad66a9')
Children:
350a6d224148d833e5548c77167a09e0efc470db
Parents:
322662c5b8af027d90ce23cdbf7a11d43ad0b912
Message:
*levandov: some changes for rational ncgb


git-svn-id: file:///usr/local/Singular/svn/trunk@10972 2c84dea3-7e68-4137-9b89-c4e89433aadc
Location:
kernel
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • kernel/gr_kstd2.cc

    r322662 r326434  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: gr_kstd2.cc,v 1.24 2008-08-04 07:31:13 Singular Exp $ */
     4/* $Id: gr_kstd2.cc,v 1.25 2008-08-07 21:15:56 levandov Exp $ */
    55/*
    66*  ABSTRACT -  Kernel: noncomm. alg. of Buchberger
     
    257257          c_p = nc_CreateSpoly(pCopy(strat->S[c_j]),pCopy((*h).p), currRing);
    258258        else
    259           c_p=nc_rat_ReduceSpolyNew(pCopy(strat->S[c_j]),
    260                pCopy((*h).p),currRing->real_var_start-1,currRing);
     259          c_p=nc_rat_ReduceSpolyNew(pCopy((*h).p), pCopy(strat->S[c_j]),currRing->real_var_start-1,currRing);
    261260        pDelete(&((*h).p));
    262261        (*h).p=c_p;
  • kernel/ratgring.cc

    r322662 r326434  
    77 *  Author:  levandov (Viktor Levandovsky)
    88 *  Created: 8/00 - 11/00
    9  *  Version: $Id: ratgring.cc,v 1.10 2008-06-10 10:17:32 motsak Exp $
     9 *  Version: $Id: ratgring.cc,v 1.11 2008-08-07 21:15:56 levandov Exp $
    1010 *******************************************************************/
    1111#include "mod2.h"
     
    2828void pLcmRat(poly a, poly b, poly m, int rat_shift)
    2929{
    30   /* shift is the last exp one should count with */
     30  /* rat_shift is the last exp one should count with */
    3131  int i;
    32   for (i=pVariables; i=rat_shift; i--)
     32  for (i=pVariables; i>=rat_shift; i--)
    3333  {
    3434    pSetExp(m,i, si_max( pGetExp(a,i), pGetExp(b,i)));
     
    121121  poly t=pr;
    122122  Exponent_t e1,e2;
    123   for (i=ishift+1 ; i<=r->N; i++)
     123  for (i=ishift+1; i<=r->N; i++)
    124124  {
    125125    e1 = p_GetExp(p1, i, r);
     
    142142}
    143143
    144 
    145 
    146 
    147144/* returns ideal (u,v) s.t. up + vq = 0 */
    148145
    149 ideal ncGCD(poly p, poly q, const ring r)
     146ideal ncGCD2(poly p, poly q, const ring r)
    150147{
    151148  intvec *w = NULL;
     
    192189}
    193190
    194 
     191/* returns ideal (u,v) s.t. up + vq = 0 */
     192
     193ideal ncGCD(poly p, poly q, const ring r)
     194{
     195  // assume: p,q are in the comm. ring
     196  // to be used in the coeff business
     197#ifdef PDEBUG
     198  Print("G_start:");
     199#endif
     200  poly g = singclap_gcd(p_Copy(p,r),p_Copy(q,r));
     201#ifdef PDEBUG
     202  p_wrp(g,r);
     203  Print("G_end;");
     204#endif
     205  poly u = singclap_pdivide(q,g); //q/g
     206  poly v = singclap_pdivide(p,g); //p/g
     207  ideal h = idInit(2,1);
     208  h->m[0] = u; // p_Copy(u,r);
     209  h->m[1] = v; // p_Copy(v,r);
     210  return(h);
     211}
    195212
    196213/* PINLINE1 void p_ExpVectorDiff
     
    368385
    369386  poly m = pOne();
    370   p_ExpVectorDiffRat(m, p2, p1, ishift, r); // includes X and D parts
     387  p_ExpVectorDiffRat(m, p1, p2, ishift, r); // includes X and D parts
    371388  //p_Setm(m,r);
    372389  //  m = p_GetExp_k_n(m,1,ishift,r); /* rat D-exp of m */
     
    380397  HH = p_Copy(p_HeadRat(p1,is,r),r); // lm_D(g)
    381398//  H  = r->nc->p_Procs.mm_Mult_p(m, p_Copy(HH, r), r); // d^aplha lm_D(g)
    382   H  = nc_mm_Mult_pp(m, HH, r); // d^aplha lm_D(g)
    383 
    384   poly K  = p_Copy( p_GetCoeffRat(H,  is, r), r);
     399  H  = nc_mm_Mult_pp(m, HH, r); // d^aplha lm_D(g) == h_g in the paper
     400
     401  poly K  = p_Copy( p_GetCoeffRat(H,  is, r), r); // k in the paper
    385402  Print("k: "); p_wrp(K,r); PrintS("\n");
    386   poly P  = p_Copy( p_GetCoeffRat(p2, is, r), r);
     403  poly P  = p_Copy( p_GetCoeffRat(p2, is, r), r); // lc_D(p_2) == lc_D(f)
    387404  Print("p: "); p_wrp(P,r); PrintS("\n");
    388405
     
    434451
    435452  Print("d^a t_g: "); p_wrp(out,r);
    436   PrintS(" end reduction");
    437   out = p_Add_q(H, out, r);
     453  Print(" end reduction\n");
     454  out = p_Add_q(H, out, r); // r_g + d^a t_g
    438455  p_Test(out,r);
    439   out  = p_Mult_q(PP, out, r);
    440 
    441   out = p_Add_q(p2,out,r); // delete out, p2
     456  out  = p_Mult_q(PP, out, r); // c' (r_g + d^a t_g)
     457
     458  out = p_Add_q(p2,out,r); // delete out, p2; // the sum
    442459  p_Test(out,r);
    443460  if ( out!=NULL ) pContent(out);
  • kernel/ratgring.h

    r322662 r326434  
    44*  Computer Algebra System SINGULAR     *
    55****************************************/
    6 /* $Id: ratgring.h,v 1.5 2008-01-31 13:23:25 Singular Exp $ */
     6/* $Id: ratgring.h,v 1.6 2008-08-07 21:15:56 levandov Exp $ */
    77/*
    88* ABSTRACT additional defines etc for --with-plural
     
    3131void p_ExpVectorDiffRat(poly pr, poly p1, poly p2, int ishift, ring r);
    3232
    33 ideal ncGCD(poly p, poly q, ring r);
     33ideal ncGCD2(poly p, poly q, ring r); // real nc stuff
     34
     35ideal ncGCD(poly p, poly q, ring r); // for p,q from a commutative ring
    3436
    3537//poly nc_rat_CreateSpoly(poly p1, poly p2, poly spNoether, int ishift, ring r);
Note: See TracChangeset for help on using the changeset viewer.