Changeset 2f573cc in git
- Timestamp:
- Oct 12, 2010, 11:45:58 AM (14 years ago)
- Branches:
- (u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
- Children:
- cd3dd1380fd4640bedd9c9aadf0c15e9113e7a9c
- Parents:
- e31d298046b3c48cd4d618071c9f63b60c561667
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/extra.cc
re31d29 r2f573cc 127 127 #include <kernel/clapconv.h> 128 128 #include <kernel/kstdfac.h> 129 #include <factor.h> 129 130 #endif 130 131 #include <kernel/clapsing.h> … … 3370 3371 } 3371 3372 else 3373 /*================= factoras =========================*/ 3374 if (strcmp (sys_cmd, "factoras") == 0) 3375 { 3376 if (h!=NULL && (h->Typ()== POLY_CMD) && (h->next->Typ() == IDEAL_CMD)) 3377 { 3378 CanonicalForm F( convSingTrPFactoryP((poly)(h->Data()))); 3379 h= h->next; 3380 ideal I= ((ideal) h->Data()); 3381 int i= IDELEMS (I); 3382 CFList as; 3383 for (int j= 0; j < i; j++) 3384 as.append (convSingTrPFactoryP (I->m[j])); 3385 int success= 0; 3386 CFFList libfacResult= newfactoras (F, as, success); 3387 if (success >= 0) 3388 { 3389 //convert factors 3390 ideal factors= idInit(libfacResult.length(),1); 3391 CFFListIterator j= libfacResult; 3392 i= 0; 3393 intvec *mult= new intvec (libfacResult.length()); 3394 for ( ; j.hasItem(); j++,i++ ) 3395 { 3396 factors->m[i]= convFactoryPSingTrP (j.getItem().factor()); 3397 (*mult)[i]= j.getItem().exp(); 3398 } 3399 lists l= (lists)omAllocBin( slists_bin); 3400 l->Init(2); 3401 l->m[0].rtyp= IDEAL_CMD; 3402 l->m[0].data= (char *) factors; 3403 l->m[1].rtyp= INTVEC_CMD; 3404 l->m[1].data= (char *) mult; 3405 res->data= l; 3406 res->rtyp= LIST_CMD; 3407 if (success == 0) 3408 WerrorS ("factorization maybe incomplete"); 3409 return FALSE; 3410 } 3411 else 3412 { 3413 WerrorS("problem in libfac"); 3414 return TRUE; 3415 } 3416 } 3417 else 3418 { 3419 WerrorS("`system(\"factoras\",<poly>,<ideal>) expected"); 3420 return TRUE; 3421 } 3422 } 3423 else 3372 3424 #endif 3373 3425 #ifdef ix86_Win -
libfac/charset/alg_factor.cc
re31d29 r2f573cc 811 811 812 812 CFFList 813 newcfactor(const CanonicalForm & f, const CFList & as, int success ){813 newcfactor(const CanonicalForm & f, const CFList & as, int & success ){ 814 814 Off(SW_RATIONAL); 815 815 CFFList Output, output, Factors=Factorize(f); On(SW_RATIONAL); -
libfac/charset/alg_factor.h
re31d29 r2f573cc 28 28 29 29 CFFList newfactoras( const CanonicalForm & f, const CFList & as, int &success); 30 CFFList newcfactor(const CanonicalForm & f, const CFList & as, int success );31 30 /*BEGINPUBLIC*/ 31 CFFList newcfactor(const CanonicalForm & f, const CFList & as, int & success ); 32 32 /*ENDPUBLIC*/ 33 33 -
libfac/factor.h
re31d29 r2f573cc 22 22 CFFList Factorize2(CanonicalForm F, const CanonicalForm & minpoly ); 23 23 CFFList newfactoras( const CanonicalForm & f, const CFList & as, int &success); 24 CFFList newcfactor( const CanonicalForm & f, const CFList & as, int &success); 24 25 25 26 //// Note: InternalSqrFree does only the work needed for factorization.
Note: See TracChangeset
for help on using the changeset viewer.