- Timestamp:
- Jun 19, 2001, 5:29:04 PM (23 years ago)
- Branches:
- (u'fieker-DuVal', '117eb8c30fc9e991c4decca4832b1d19036c4c65')(u'spielwiese', 'fc741b6502fd8a97288eaa3eba6e5220f3c3df87')
- Children:
- a29d092aead668e4b42f61b65a02c917cba27025
- Parents:
- b6bd558c32f6b1ed1f45d9a2ab9d560c970244e5
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libfac/factor/helpstuff.cc
rb6bd55 r518620 2 2 //////////////////////////////////////////////////////////// 3 3 // emacs edit mode for this file is -*- C++ -*- 4 // static char * rcsid = "$Id: helpstuff.cc,v 1. 3 1997-09-12 07:19:56Singular Exp $";4 // static char * rcsid = "$Id: helpstuff.cc,v 1.4 2001-06-19 15:29:04 Singular Exp $"; 5 5 //////////////////////////////////////////////////////////// 6 6 // FACTORY - Includes … … 11 11 #include "helpstuff.h" 12 12 13 bool 13 bool 14 14 mydivremt ( const CanonicalForm& f, const CanonicalForm& g, CanonicalForm& a, CanonicalForm& b ){ 15 15 bool retvalue; … … 51 51 if ( copy.factor() == TheFactor.factor() ) 52 52 exp += copy.exp(); 53 else 53 else 54 54 Outputlist.append(copy); 55 55 } … … 74 74 Powerup( const int base , const int exp){ 75 75 int retvalue=1; 76 if ( exp == 0 ) return retvalue ; 76 if ( exp == 0 ) return retvalue ; 77 77 else for ( int i=1 ; i <= exp; i++ ) retvalue *= base ; 78 78 … … 90 90 // modpower: the real work is done here; called by mod_power // 91 91 /////////////////////////////////////////////////////////////// 92 static void 93 modpower( const CanonicalForm & f, int k , int td, 94 92 static void 93 modpower( const CanonicalForm & f, int k , int td, 94 const CanonicalForm & t, CanonicalForm & result){ 95 95 96 96 if ( td >= k ) return; … … 103 103 } 104 104 105 CanonicalForm 105 CanonicalForm 106 106 mod_power( const CanonicalForm & f, int k, int levelU){ 107 107 CanonicalForm result,dummy; … … 128 128 // Return the deg of F in the Variables x_1,..,x_(levelF-1) // 129 129 /////////////////////////////////////////////////////////////// 130 int 130 int 131 131 subvardegree( const CanonicalForm & F, int levelF ){ 132 132 int n=0,m=degree(F,levelF),newn=0; … … 142 142 // Change poly: x_i <- x_i +- a_i for i= 1,..,level(f)-1 // 143 143 /////////////////////////////////////////////////////////////// 144 CanonicalForm 144 CanonicalForm 145 145 change_poly( const CanonicalForm & f , const SFormList & Substitutionlist ,int directionback ){ 146 146 CanonicalForm F=f,g,k; … … 153 153 // ==> g = x_i ; k = a_i 154 154 level_i=level(i.getItem().factor()); 155 g = power( 156 157 ); 155 g = power( 156 Variable(level_i),1 157 ); 158 158 k= i.getItem().exp(); 159 if ( directionback ){ 159 if ( directionback ) 160 { 160 161 if ( degree(F, level_i) != 0 ) 161 F=F(g-k, level(i.getItem().factor())); // x_i <-- x_i - a_i162 F=F(g-k, level_i /*level(i.getItem().factor())*/); // x_i <-- x_i - a_i 162 163 } 163 else{ 164 else 165 { 164 166 if ( degree(F, level_i) != 0 ) 165 F=F(g+k, level(i.getItem().factor())); // x_i <-- x_i +a_i167 F=F(g+k, level_i /*level(i.getItem().factor())*/); // x_i <-- x_i +a_i 166 168 } 167 169 } … … 173 175 /* 174 176 $Log: not supported by cvs2svn $ 177 Revision 1.3 1997/09/12 07:19:56 Singular 178 * hannes/michael: libfac-0.3.0 179 175 180 Revision 1.3 1997/04/25 22:20:45 michael 176 181 Version for libfac-0.2.1
Note: See TracChangeset
for help on using the changeset viewer.