Changeset 9b2e40 in git


Ignore:
Timestamp:
Jun 13, 2005, 6:23:30 PM (18 years ago)
Author:
Hans Schönemann <hannes@…>
Branches:
(u'spielwiese', '0d6b7fcd9813a1ca1ed4220cfa2b104b97a0a003')
Children:
a8d0266204146ab7540d16124586c7f957757ea7
Parents:
19fc57bf1d64049e9869d7a195dc56f156f8e197
Message:
*hannes: bifac stuff


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

Legend:

Unmodified
Added
Removed
  • kernel/clapconv.cc

    r19fc57b r9b2e40  
    33*  Computer Algebra System SINGULAR     *
    44****************************************/
    5 // $Id: clapconv.cc,v 1.4 2005-04-13 16:38:09 Singular Exp $
     5// $Id: clapconv.cc,v 1.5 2005-06-13 16:23:30 Singular Exp $
    66/*
    77* ABSTRACT: convert data between Singular and factory
     
    3131static void convRecPTr ( const CanonicalForm & f, int * exp, napoly & result );
    3232
    33 static void convRecAP ( const CanonicalForm & f, int * exp, poly & result );
    34 
    3533static void convRecTrP ( const CanonicalForm & f, int * exp, poly & result, int offs );
    3634
     
    462460}
    463461
    464 poly convClapAPSingAP ( const CanonicalForm & f )
    465 {
    466   int n = pVariables+1+1/*rPar(currRing)*/;
     462static void
     463convRecAP_R ( const CanonicalForm & f, int * exp, poly & result, int par_start, int var_start) ;
     464
     465poly convClapAPSingAP_R ( const CanonicalForm & f, int par_start, int var_start )
     466{
     467  int n = pVariables+1+rPar(currRing);
    467468  int * exp = new int[n];
    468469  // for ( int i = 0; i < n; i++ ) exp[i] = 0;
    469470  memset(exp,0,n*sizeof(int));
    470471  poly result = NULL;
    471   convRecAP( f, exp, result );
     472  convRecAP_R( f, exp, result,par_start, var_start );
    472473  delete [] exp;
    473474  return result;
    474475}
     476poly convClapAPSingAP ( const CanonicalForm & f )
     477{
     478  return convClapAPSingAP_R(f,0,rPar(currRing));
     479}
    475480
    476481static void
    477 convRecAP ( const CanonicalForm & f, int * exp, poly & result )
     482convRecAP_R ( const CanonicalForm & f, int * exp, poly & result, int par_start, int var_start )
    478483{
    479484  if (f == 0)
    480485    return;
    481   int off=rPar(currRing);
    482486  if ( ! f.inCoeffDomain() )
    483487  {
     
    486490    {
    487491      exp[l] = i.exp();
    488       convRecAP( i.coeff(), exp, result );
     492      convRecAP_R( i.coeff(), exp, result, par_start, var_start );
    489493    }
    490494    exp[l] = 0;
     
    499503      int i;
    500504      for ( i = 1; i <= pVariables; i++ )
    501         pSetExp( term, i , exp[i+off]);
     505        pSetExp( term, i , exp[i+var_start]);
    502506      pSetComp(term, 0);
    503       for ( i = 1; i <= off; i++ )
     507      if (par_start==0)
     508      {
     509        for ( i = 1; i <= var_start; i++ )
    504510        //z->e[i-1]+=exp[i];
    505         napAddExp(z,i,exp[i]);
     511          napAddExp(z,i,exp[i]);
     512      }
     513      else
     514      {
     515        for ( i = par_start+1; i <= var_start+rPar(currRing); i++ )
     516        //z->e[i-1]+=exp[i];
     517          napAddExp(z,i,exp[i-par_start]);
     518      }
    506519      pGetCoeff(term)=(number)omAlloc0Bin(rnumber_bin);
    507520      ((lnumber)pGetCoeff(term))->z=z;
  • kernel/clapconv.h

    r19fc57b r9b2e40  
    33*  Computer Algebra System SINGULAR     *
    44****************************************/
    5 // $Id: clapconv.h,v 1.1.1.1 2003-10-06 12:15:50 Singular Exp $
     5// $Id: clapconv.h,v 1.2 2005-06-13 16:23:30 Singular Exp $
    66/*
    77* ABSTRACT: convert data between Singular and factory
     
    2727CanonicalForm convSingAPClapAP ( poly p , const Variable & a );
    2828poly convClapAPSingAP ( const CanonicalForm & f );
     29poly convClapAPSingAP_R ( const CanonicalForm & f, int par_start, int var_start );
    2930
    3031CanonicalForm convSingGFClapGF ( poly p );
Note: See TracChangeset for help on using the changeset viewer.