Changeset 9b2e40 in git
- Timestamp:
- Jun 13, 2005, 6:23:30 PM (18 years ago)
- Branches:
- (u'spielwiese', '0d6b7fcd9813a1ca1ed4220cfa2b104b97a0a003')
- Children:
- a8d0266204146ab7540d16124586c7f957757ea7
- Parents:
- 19fc57bf1d64049e9869d7a195dc56f156f8e197
- Location:
- kernel
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/clapconv.cc
r19fc57b r9b2e40 3 3 * Computer Algebra System SINGULAR * 4 4 ****************************************/ 5 // $Id: clapconv.cc,v 1. 4 2005-04-13 16:38:09Singular Exp $5 // $Id: clapconv.cc,v 1.5 2005-06-13 16:23:30 Singular Exp $ 6 6 /* 7 7 * ABSTRACT: convert data between Singular and factory … … 31 31 static void convRecPTr ( const CanonicalForm & f, int * exp, napoly & result ); 32 32 33 static void convRecAP ( const CanonicalForm & f, int * exp, poly & result );34 35 33 static void convRecTrP ( const CanonicalForm & f, int * exp, poly & result, int offs ); 36 34 … … 462 460 } 463 461 464 poly convClapAPSingAP ( const CanonicalForm & f ) 465 { 466 int n = pVariables+1+1/*rPar(currRing)*/; 462 static void 463 convRecAP_R ( const CanonicalForm & f, int * exp, poly & result, int par_start, int var_start) ; 464 465 poly convClapAPSingAP_R ( const CanonicalForm & f, int par_start, int var_start ) 466 { 467 int n = pVariables+1+rPar(currRing); 467 468 int * exp = new int[n]; 468 469 // for ( int i = 0; i < n; i++ ) exp[i] = 0; 469 470 memset(exp,0,n*sizeof(int)); 470 471 poly result = NULL; 471 convRecAP ( f, exp, result );472 convRecAP_R( f, exp, result,par_start, var_start ); 472 473 delete [] exp; 473 474 return result; 474 475 } 476 poly convClapAPSingAP ( const CanonicalForm & f ) 477 { 478 return convClapAPSingAP_R(f,0,rPar(currRing)); 479 } 475 480 476 481 static void 477 convRecAP ( const CanonicalForm & f, int * exp, poly & result )482 convRecAP_R ( const CanonicalForm & f, int * exp, poly & result, int par_start, int var_start ) 478 483 { 479 484 if (f == 0) 480 485 return; 481 int off=rPar(currRing);482 486 if ( ! f.inCoeffDomain() ) 483 487 { … … 486 490 { 487 491 exp[l] = i.exp(); 488 convRecAP ( i.coeff(), exp, result );492 convRecAP_R( i.coeff(), exp, result, par_start, var_start ); 489 493 } 490 494 exp[l] = 0; … … 499 503 int i; 500 504 for ( i = 1; i <= pVariables; i++ ) 501 pSetExp( term, i , exp[i+ off]);505 pSetExp( term, i , exp[i+var_start]); 502 506 pSetComp(term, 0); 503 for ( i = 1; i <= off; i++ ) 507 if (par_start==0) 508 { 509 for ( i = 1; i <= var_start; i++ ) 504 510 //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 } 506 519 pGetCoeff(term)=(number)omAlloc0Bin(rnumber_bin); 507 520 ((lnumber)pGetCoeff(term))->z=z; -
kernel/clapconv.h
r19fc57b r9b2e40 3 3 * Computer Algebra System SINGULAR * 4 4 ****************************************/ 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 $ 6 6 /* 7 7 * ABSTRACT: convert data between Singular and factory … … 27 27 CanonicalForm convSingAPClapAP ( poly p , const Variable & a ); 28 28 poly convClapAPSingAP ( const CanonicalForm & f ); 29 poly convClapAPSingAP_R ( const CanonicalForm & f, int par_start, int var_start ); 29 30 30 31 CanonicalForm convSingGFClapGF ( poly p );
Note: See TracChangeset
for help on using the changeset viewer.