Changeset 27bb97f in git for factory/NTLconvert.cc
- Timestamp:
- Nov 12, 2009, 11:55:27 AM (14 years ago)
- Branches:
- (u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
- Children:
- 7c0ec64d02acb77b4c31f823ce2de8ad57608f64
- Parents:
- 82280dceb4425e375b32418f9021aa6a5f480272
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
factory/NTLconvert.cc
r82280d r27bb97f 53 53 #endif 54 54 55 void out_cf(c har *s1,const CanonicalForm &f,char *s2);55 void out_cf(const char *s1,const CanonicalForm &f,const char *s2); 56 56 57 57 … … 73 73 // OUTPUT: The converted NTL-polynomial over F_p of type ZZpX // 74 74 //////////////////////////////////////////////////////////////////////////////// 75 76 #if 077 void out_cf(char *s1,const CanonicalForm &f,char *s2)78 {79 printf("%s",s1);80 if (f.isZero()) printf("+0");81 else if (! f.inCoeffDomain() )82 {83 int l = f.level();84 for ( CFIterator i = f; i.hasTerms(); i++ )85 {86 int e=i.exp();87 printf("+(");out_cf("+(",i.coeff(),")*v(");printf("%d)^%d",l,e);88 }89 }90 else91 {92 if ( f.isImm() )93 {94 printf("+%d(",f.intval());95 }96 else printf("+...(");97 if (f.inZ()) printf("Z)");98 else if (f.inQ()) printf("Q)");99 else if (f.inFF()) printf("FF)");100 else if (f.inPP()) printf("PP)");101 else if (f.inGF()) printf("PP)");102 else if (f.inExtension()) printf("E(%d))",f.level());103 }104 printf("%s",s2);105 }106 #endif107 75 108 76 ZZ_pX convertFacCF2NTLZZpX(CanonicalForm f)
Note: See TracChangeset
for help on using the changeset viewer.