Changeset e82417 in git
- Timestamp:
- Aug 12, 2011, 5:29:12 PM (12 years ago)
- Branches:
- (u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', 'a800fe4b3e9d37a38c5a10cc0ae9dfa0c15a4ee6')
- Children:
- 45c9bd3cc75a93224a2ce248f62c450b05c2ec61
- Parents:
- 94a065cc1eef470efefb950abf185f50c06ba20d
- git-author:
- Oleksandr Motsak <motsak@mathematik.uni-kl.de>2011-08-12 17:29:12+02:00
- git-committer:
- Mohamed Barakat <mohamed.barakat@rwth-aachen.de>2011-11-09 13:22:44+01:00
- Location:
- libpolys/polys
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
libpolys/polys/ext_fields/algext.cc
r94a065c re82417 679 679 680 680 681 number naParam( short iParameter, const coeffs cf)681 number naParam(const short iParameter, const coeffs cf) 682 682 { 683 683 assume(getCoeffType(cf) == ID); … … 685 685 const ring R = cf->extRing; 686 686 assume( R != NULL ); 687 assume( 0 < = iParameter && iParameter <rVar(R) );687 assume( 0 < iParameter && iParameter <= rVar(R) ); 688 688 689 689 poly p = p_One(R); p_SetExp(p, iParameter, 1, R); p_Setm(p, R); … … 691 691 return (number) p; 692 692 } 693 694 695 /// if m == var(i)/1 => return i, 696 int naIsParam(number m, const coeffs cf) 697 { 698 assume(getCoeffType(cf) == ID); 699 700 const ring R = cf->extRing; 701 assume( R != NULL ); 702 703 return p_Var( (poly)m, R ); 704 } -
libpolys/polys/ext_fields/algext.h
r94a065c re82417 82 82 number naParam(short iParameter, const coeffs cf); 83 83 84 85 /// if m == var(i)/1 => return i, 86 int naIsParam(number, const coeffs); 87 84 88 #endif 85 89 /* ALGEXT_H */ -
libpolys/polys/ext_fields/transext.cc
r94a065c re82417 54 54 55 55 #include "ext_fields/transext.h" 56 57 58 59 60 56 61 57 … … 1132 1128 1133 1129 1134 number ntParam( short iParameter, const coeffs cf)1130 number ntParam(const short iParameter, const coeffs cf) 1135 1131 { 1136 1132 assume(getCoeffType(cf) == ID); … … 1138 1134 const ring R = cf->extRing; 1139 1135 assume( R != NULL ); 1140 assume( 0 < = iParameter && iParameter <rVar(R) );1136 assume( 0 < iParameter && iParameter <= rVar(R) ); 1141 1137 1142 1138 poly p = p_One(R); p_SetExp(p, iParameter, 1, R); p_Setm(p, R); … … 1151 1147 return (number)f; 1152 1148 } 1149 1150 1151 /// if m == var(i)/1 => return i, 1152 int ntIsParam(number m, const coeffs cf) 1153 { 1154 assume(getCoeffType(cf) == ID); 1155 1156 const ring R = cf->extRing; 1157 assume( R != NULL ); 1158 1159 fraction f = (fraction)m; 1160 1161 if( DEN(f) != NULL ) 1162 return 0; 1163 1164 return p_Var( NUM(f), R ); 1165 } -
libpolys/polys/ext_fields/transext.h
r94a065c re82417 124 124 number ntParam(short iParameter, const coeffs cf); 125 125 126 /// if m == var(i)/1 => return i, 127 int ntIsParam(number, const coeffs); 128 126 129 #endif 127 130 /* TRANSEXT_H */ -
libpolys/polys/monomials/ring.cc
r94a065c re82417 22 22 // #include <???/febase.h> 23 23 // #include <???/intvec.h> 24 //#include <polys/ext_fields/longalg.h>25 //#include <polys/ext_fields/longtrans.h>26 24 // #include <coeffs/ffields.h> 27 25 #include <polys/monomials/ring.h> … … 41 39 // #include <???/maps.h> 42 40 // #include <???/matpol.h> 41 42 43 #include "ext_fields/algext.h" 44 #include "ext_fields/transext.h" 45 43 46 44 47 #define BITS_PER_LONG 8*SIZEOF_LONG … … 5568 5571 const n_coeffType _filed_type = getCoeffType(C); 5569 5572 5570 if ( iParameter < 0 || iParameter >=rPar(r) )5573 if ( iParameter <= 0 || iParameter > rPar(r) ) 5571 5574 // Wrong parameter 5572 5575 return NULL; 5573 5576 5574 5577 if( _filed_type == n_algExt ) 5575 {5576 extern number naParam(short iParameter, const coeffs cf);5577 5578 return naParam(iParameter, C); 5578 }5579 5579 5580 5580 if( _filed_type == n_transExt ) 5581 {5582 extern number ntParam(short iParameter, const coeffs cf);5583 5581 return ntParam(iParameter, C); 5584 }5585 5582 5586 5583 return NULL; 5587 5584 } 5588 5585 5586 5587 5588 int n_IsParam(number m, const ring r) 5589 { 5590 assume(r != NULL); 5591 const coeffs C = r->cf; 5592 assume(C != NULL); 5593 5594 const n_coeffType _filed_type = getCoeffType(C); 5595 5596 if( _filed_type == n_algExt ) 5597 return naIsParam(m, C); 5598 5599 if( _filed_type == n_transExt ) 5600 return ntIsParam(m, C); 5601 5602 return 0; 5603 } 5604 -
libpolys/polys/monomials/ring.h
r94a065c re82417 562 562 563 563 /// return the specified parameter as a (new!) number in the given 564 /// polynomial ring, or NULL if invalid 564 /// polynomial ring, or NULL if invalid 565 /// parameters (as variables) begin with 1! 565 566 number n_Param(const short iParameter, const ring r); 566 567 568 /// if m == var(i)/1 => return i, 569 int n_IsParam(number m, const ring r); 567 570 568 571 /* R, Q, Fp: FALSE */
Note: See TracChangeset
for help on using the changeset viewer.