Changeset 98474f in git for libpolys/coeffs/coeffs.h
- Timestamp:
- Jul 17, 2012, 9:09:26 PM (12 years ago)
- Branches:
- (u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
- Children:
- 975db1808b2b0917d858a9096710abc55c256aec
- Parents:
- 805d0b10ffd62e7ff079f116851129cc4ae8f89d
- git-author:
- Oleksandr Motsak <motsak@mathematik.uni-kl.de>2012-07-17 21:09:26+02:00
- git-committer:
- Oleksandr Motsak <motsak@mathematik.uni-kl.de>2012-07-17 21:33:55+02:00
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libpolys/coeffs/coeffs.h
r805d0b1 r98474f 13 13 14 14 #include <coeffs/si_gmp.h> 15 16 #include <coeffs/Enumerator.h> 15 17 16 18 #ifdef HAVE_FACTORY … … 64 66 typedef number (*nMapFunc)(number a, const coeffs src, const coeffs dst); 65 67 68 69 /// Abstract interface for an enumerator of number coefficients for an 70 /// object, e.g. a polynomial 71 typedef IEnumerator<number> ICoeffsEnumerator; 72 73 /// goes over coeffs given by the ICoeffsEnumerator and changes them. 74 /// Additionally returns a number; 75 typedef void (*nCoeffsEnumeratorFunc)(ICoeffsEnumerator& numberCollectionEnumerator, number& output, const coeffs r); 76 77 66 78 /// Creation data needed for finite fields 67 79 typedef struct … … 196 208 /// create i^th parameter or NULL if not possible 197 209 number (*cfParameter)(const int i, const coeffs r); 210 211 /// function pointer behind n_ClearContent 212 nCoeffsEnumeratorFunc cfClearContent; 213 214 /// function pointer behind n_ClearDenominators 215 nCoeffsEnumeratorFunc cfClearDenominators; 198 216 199 217 #ifdef HAVE_FACTORY … … 793 811 794 812 795 #endif 796 813 /// Computes the content and (inplace) divides it out on a collection 814 /// of numbers 815 /// NOTE/TODO: see the description by Hans 816 /// TODO: what exactly is c? 817 static inline void n_ClearContent(ICoeffsEnumerator& numberCollectionEnumerator, number& c, const coeffs r) 818 { 819 assume(r != NULL); 820 r->cfClearContent(numberCollectionEnumerator, c, r); 821 } 822 823 /// (inplace) Clears denominators on a collection of numbers 824 /// NOTE/TODO: see the description by Hans 825 /// TODO: what exactly is d? 826 static inline void n_ClearDenominators(ICoeffsEnumerator& numberCollectionEnumerator, number& d, const coeffs r) 827 { 828 assume(r != NULL); 829 r->cfClearDenominators(numberCollectionEnumerator, d, r); 830 } 831 832 // convenience helpers (no number returned - but the input enumeration 833 // is to be changed 834 // TODO: do we need separate hooks for these as our existing code does 835 // *different things* there: compare p_Cleardenom (which calls 836 // *p_Content) and p_Cleardenom_n (which doesn't)!!! 837 838 static inline void n_ClearContent(ICoeffsEnumerator& numberCollectionEnumerator, const coeffs r) 839 { 840 number c; 841 n_ClearContent(numberCollectionEnumerator, c, r); 842 n_Delete(&c, r); 843 } 844 845 static inline void n_ClearDenominators(ICoeffsEnumerator& numberCollectionEnumerator, const coeffs r) 846 { 847 assume(r != NULL); 848 number d; 849 n_ClearDenominators(numberCollectionEnumerator, d, r); 850 n_Delete(&d, r); 851 } 852 853 854 #endif 855
Note: See TracChangeset
for help on using the changeset viewer.