Changeset a52291 in git for factory/int_rat.h
- Timestamp:
- Nov 24, 2011, 2:35:53 PM (12 years ago)
- Branches:
- (u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
- Children:
- 8b46459e9dad8bec212484f1bfce347c45e41371
- Parents:
- 1c48503bfae9bb885752ba741bd0a236df633d13
- git-author:
- Martin Lee <martinlee84@web.de>2011-11-24 14:35:53+01:00
- git-committer:
- Oleksandr Motsak <motsak@mathematik.uni-kl.de>2011-11-24 21:10:03+01:00
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
factory/int_rat.h
r1c48503 ra52291 27 27 { 28 28 private: 29 MP_INT_num;30 MP_INT_den;29 mpz_t _num; 30 mpz_t _den; 31 31 static int initialized; 32 static MP_INT &MPQNUM( const InternalCF * const c );33 static MP_INT &MPQDEN( const InternalCF * const c );34 static void normalize( const MP_INT &, const MP_INT &, MP_INT &, MP_INT &);32 static mpz_ptr MPQNUM( const InternalCF * const c ); 33 static mpz_ptr MPQDEN( const InternalCF * const c ); 34 static void normalize( const mpz_ptr, const mpz_ptr, mpz_ptr, mpz_ptr ); 35 35 public: 36 36 InternalRational(); … … 42 42 InternalRational( const int n, const int d ); 43 43 InternalRational( const char * str ); 44 InternalRational( const MP_INT &);45 InternalRational( const MP_INT &, const MP_INT &);44 InternalRational( const mpz_ptr ); 45 InternalRational( const mpz_ptr , const mpz_ptr ); 46 46 ~InternalRational(); 47 47 InternalCF* deepCopyObject() const; … … 100 100 friend void gmp_numerator ( const CanonicalForm & f, mpz_ptr result ); 101 101 friend void gmp_denominator ( const CanonicalForm & f, mpz_ptr result ); 102 friend CanonicalForm make_cf ( const MP_INT & n, const MP_INT &d );102 friend CanonicalForm make_cf ( const mpz_ptr n, const mpz_ptr d ); 103 103 }; 104 104 105 inline MP_INT &InternalRational::MPQNUM( const InternalCF * const c )105 inline mpz_ptr InternalRational::MPQNUM( const InternalCF * const c ) 106 106 { 107 107 return (((InternalRational*)c)->_num); 108 108 } 109 109 110 inline MP_INT &InternalRational::MPQDEN( const InternalCF * const c )110 inline mpz_ptr InternalRational::MPQDEN( const InternalCF * const c ) 111 111 { 112 112 return (((InternalRational*)c)->_den);
Note: See TracChangeset
for help on using the changeset viewer.