Changeset 9e131d in git
 Timestamp:
 Jun 14, 2006, 5:35:08 PM (18 years ago)
 Branches:
 (u'fiekerDuVal', '117eb8c30fc9e991c4decca4832b1d19036c4c65')(u'spielwiese', '648d28f488f6ff08f5607ff229b9ad9e4a5b93c2')
 Children:
 4a38bd8f88228c80374066df9e2be718cca09a25
 Parents:
 b61808b19dacd9344b29984c4d625e2ba8f85e8e
 Location:
 libfac/charset
 Files:

 2 edited
Legend:
 Unmodified
 Added
 Removed

libfac/charset/charset.cc
rb61808 r9e131d 2 2 //////////////////////////////////////////////////////////// 3 3 // emacs edit mode for this file is * C++ * 4 static char * rcsid = "$Id: charset.cc,v 1.1 1 20060516 14:46:49Singular Exp $";4 static char * rcsid = "$Id: charset.cc,v 1.12 20060614 15:35:08 Singular Exp $"; 5 5 ///////////////////////////////////////////////////////////// 6 6 // FACTORY  Includes … … 112 112 CFList 113 113 MCharSetN( const CFList &PS, PremForm & Remembern ){ 114 CFList QS = PS, RS = PS, CS , OLDCS;114 CFList QS = PS, RS = PS, CSet, OLDCS; 115 115 116 116 DEBOUTLN(CERR, "MCharSetN: called with ps= ", PS); 117 117 while ( ! RS.isEmpty() ) { 118 CS = BasicSet( QS );119 OLDCS=CS ;120 DEBOUTLN(CERR, "MCharSetN: CS= ", CS );121 // if ( getNumVars(CS .getFirst()) > 1 ){122 // //CS = removecontent(CS, Remembern);118 CSet = BasicSet( QS ); 119 OLDCS=CSet; 120 DEBOUTLN(CERR, "MCharSetN: CS= ", CSet); 121 // if ( getNumVars(CSet.getFirst()) > 1 ){ 122 // //CSet = removecontent(CSet, Remembern); 123 123 // #ifdef MCHARSETNDEBUG 124 // CERR << "MCharSetN: CS = " << CS<< "\n";124 // CERR << "MCharSetN: CSet= " << CSet << "\n"; 125 125 // #endif 126 126 // } 127 Remembern.FS1 = Union(Remembern.FS1, initalset1(CS ));127 Remembern.FS1 = Union(Remembern.FS1, initalset1(CSet)); 128 128 DEBOUTLN(CERR, "MCharSetN: Remembern.FS1= ", Remembern.FS1); 129 129 DEBOUTLN(CERR, "MCharSetN: Remembern.FS2= ", Remembern.FS2); 130 130 RS = CFList(); 131 if ( rank( CS .getFirst() ) != 0 ) {132 CFList D = Difference( QS, CS );131 if ( rank( CSet.getFirst() ) != 0 ) { 132 CFList D = Difference( QS, CSet ); 133 133 DEBOUT(CERR, "MCharSetN: Difference( ", QS); 134 DEBOUT(CERR, " , ", CS );134 DEBOUT(CERR, " , ", CSet); 135 135 DEBOUTLN(CERR, " ) = ", D); 136 //CERR << "MCharSetN: Difference( " << QS << " , " << CS << " ) = " << D << "\n";136 //CERR << "MCharSetN: Difference( " << QS << " , " << CSet << " ) = " << D << "\n"; 137 137 //PremForm Oldremember=Remembern; 138 138 //PremForm Newremember=Remembern; 139 139 for ( CFListIterator i = D; i.hasItem(); ++i ) { 140 CanonicalForm r = Prem( i.getItem(), CS );140 CanonicalForm r = Prem( i.getItem(), CSet ); 141 141 DEBOUT(CERR,"MCharSetN: Prem(", i.getItem() ); 142 DEBOUT(CERR, ",", CS );142 DEBOUT(CERR, ",", CSet); 143 143 DEBOUTLN(CERR,") = ", r); 144 //CERR << "MCharSetN: Prem("<< i.getItem() << "," << CS << ") = " << r << "\n";144 //CERR << "MCharSetN: Prem("<< i.getItem() << "," << CSet << ") = " << r << "\n"; 145 145 if ( r != 0 ){ 146 146 //removefactor( r, Newremember ); … … 164 164 DEBOUTLN(CERR, "MCharSetN: Remembern.FS1: ", Remembern.FS1); 165 165 166 return CS ;166 return CSet; 167 167 } 168 168 … … 183 183 CFList 184 184 CharSet( const CFList &PS ){ 185 CFList QS = PS, RS = PS, CS ;185 CFList QS = PS, RS = PS, CSet; 186 186 187 187 while ( ! RS.isEmpty() ) { 188 CS = BasicSet( QS );189 DEBOUTLN(CERR, "CharSet: CS = ", CS);188 CSet = BasicSet( QS ); 189 DEBOUTLN(CERR, "CharSet: CSet= ", CSet); 190 190 RS = CFList(); 191 if ( rank( CS .getFirst() ) != 0 ) {192 CFList D = Difference( QS, CS );191 if ( rank( CSet.getFirst() ) != 0 ) { 192 CFList D = Difference( QS, CSet ); 193 193 for ( CFListIterator i = D; i.hasItem(); ++i ) { 194 CanonicalForm r = Prem( i.getItem(), CS );194 CanonicalForm r = Prem( i.getItem(), CSet ); 195 195 if ( r != 0 ) RS=Union(CFList(r),RS);//RS.append( r ); 196 196 } … … 198 198 } 199 199 } 200 return CS ;200 return CSet; 201 201 } 202 202 203 203 static CFList 204 204 charseta( const CFList & PS ){ 205 CFList QS = PS, RS = PS, CS ;205 CFList QS = PS, RS = PS, CSet; 206 206 207 207 while ( ! RS.isEmpty() ) { 208 CS = CharSet( QS );208 CSet = CharSet( QS ); 209 209 RS = CFList(); 210 if ( rank( CS .getFirst() ) != 0 ) {211 CFList D = Difference( QS, CS );210 if ( rank( CSet.getFirst() ) != 0 ) { 211 CFList D = Difference( QS, CSet ); 212 212 for ( CFListIterator i = D; i.hasItem(); ++i ) { 213 CanonicalForm r = Prem( i.getItem(), CS );213 CanonicalForm r = Prem( i.getItem(), CSet ); 214 214 if ( r != 0 ) RS=Union(CFList(r),RS);//RS.append( r ); 215 215 } 216 QS = Union(CS ,Union( QS, RS ));216 QS = Union(CSet,Union( QS, RS )); 217 217 } 218 218 else return CFList(CanonicalForm(1)); 219 219 } 220 return CS ;220 return CSet; 221 221 } 222 222 … … 599 599 /* 600 600 $Log: not supported by cvs2svn $ 601 Revision 1.11 2006/05/16 14:46:49 Singular 602 *hannes: gcc 4.1 fixes 603 601 604 Revision 1.10 2002/08/19 11:11:31 Singular 602 605 * hannes/pfister: alg_gcd etc. 
libfac/charset/csutil.h
rb61808 r9e131d 2 2 //////////////////////////////////////////////////////////// 3 3 // emacs edit mode for this file is * C++ * 4 // $Id: csutil.h,v 1. 4 20020819 11:11:32Singular Exp $4 // $Id: csutil.h,v 1.5 20060614 15:35:08 Singular Exp $ 5 5 //////////////////////////////////////////////////////////// 6 6 … … 63 63 void removefactor( CanonicalForm & r , PremForm & Remembern); 64 64 CFList factorps( const CFList &ps ); 65 //CFList initalset(const CFList & CS );66 CFList initalset1(const CFList & CS );67 CFList initalset2(const CFList & CS , const CanonicalForm & reducible);68 int irreducible( const CFList & AS );69 CFList select( const ListCFList & PS );65 //CFList initalset(const CFList & CSet); 66 CFList initalset1(const CFList & CSet); 67 CFList initalset2(const CFList & CSet, const CanonicalForm & reducible); 68 int irreducible( const CFList & ASet); 69 CFList select( const ListCFList & PSet); 70 70 void select( const ListCFList & ppi, int length, ListCFList & ppi1, 71 71 ListCFList & ppi2); 72 72 bool same( const CFList &A, const CFList &B ); 73 73 bool member( const CFList & cs, const ListCFList & pi ); 74 bool subset( const CFList &PS , const CFList &CS);74 bool subset( const CFList &PSet, const CFList &CSet ); 75 75 ListCFList MyUnion( const ListCFList & a, const ListCFList &b ); 76 76 ListCFList MyDifference( const ListCFList & a, const CFList &b); … … 81 81 /* 82 82 $Log: not supported by cvs2svn $ 83 Revision 1.4 2002/08/19 11:11:32 Singular 84 * hannes/pfister: alg_gcd etc. 85 83 86 Revision 1.3 1997/09/12 07:19:42 Singular 84 87 * hannes/michael: libfac0.3.0
Note: See TracChangeset
for help on using the changeset viewer.