Changeset de88371 in git for libpolys/coeffs/longrat.cc


Ignore:
Timestamp:
Jul 18, 2012, 3:28:22 PM (11 years ago)
Author:
Oleksandr Motsak <motsak@…>
Branches:
(u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', 'c987db42cd2ec943b97ac5746c99892ceddf909c')
Children:
91ecf187772d8c5893550eabd5abde87d2f29b9c
Parents:
975db1808b2b0917d858a9096710abc55c256aec
git-author:
Oleksandr Motsak <motsak@mathematik.uni-kl.de>2012-07-18 15:28:22+02:00
git-committer:
Oleksandr Motsak <motsak@mathematik.uni-kl.de>2012-07-18 15:41:07+02:00
Message:
Added stubs for putting the actual code (TODO!), where required (i.e. described) by Hans

chg: descriptions for the output number (n_ClearContent & n_ClearDenominators)
chg: publicly available default implementations ndClearContent & ndClearDenominators for fallback calls
File:
1 edited

Legend:

Unmodified
Added
Removed
  • libpolys/coeffs/longrat.cc

    r975db18 rde88371  
    26382638}
    26392639
     2640static void nlClearContent(ICoeffsEnumerator& /*numberCollectionEnumerator*/, number& c, const coeffs cf)
     2641{
     2642  assume(cf != NULL);
     2643  assume(getCoeffType(cf) == ID);
     2644  // all coeffs are given by integers!!!
     2645
     2646  c = n_Init(1, cf);
     2647  assume(FALSE); // TODO: NOT YET IMPLEMENTED!!!
     2648
     2649//   numberCollectionEnumerator.Reset();
     2650//
     2651//   c = numberCollectionEnumerator.Current();
     2652//
     2653//   n_Normalize(c, r);
     2654//
     2655//   if (!n_IsOne(c, r))
     2656//   {   
     2657//     numberCollectionEnumerator.Current() = n_Init(1, r); // ???
     2658//
     2659//     number inv = n_Invers(c, r);
     2660//
     2661//     while( numberCollectionEnumerator.MoveNext() )
     2662//     {
     2663//       number &n = numberCollectionEnumerator.Current();
     2664//       n_Normalize(n, r); // ?
     2665//       n_InpMult(n, inv, r);
     2666//     }
     2667//
     2668//     n_Delete(&inv, r);
     2669//   }
     2670}
     2671
     2672static void nlClearDenominators(ICoeffsEnumerator& /*numberCollectionEnumerator*/, number& c, const coeffs cf)
     2673{
     2674  assume(cf != NULL);
     2675  assume(getCoeffType(cf) == ID);
     2676  // all coeffs are given by integers!!!
     2677
     2678  c = n_Init(1, cf);
     2679  assume(FALSE); // TODO: NOT YET IMPLEMENTED!!!
     2680}
     2681
    26402682BOOLEAN nlInitChar(coeffs r, void*)
    26412683{
     
    26952737  r->cfInit_bigint=nlCopyMap;
    26962738  r->cfCoeffWrite=nlCoeffWrite;
     2739
     2740  r->cfClearContent = nlClearContent;
     2741  r->cfClearDenominators = nlClearDenominators;
     2742 
    26972743#ifdef LDEBUG
    26982744  // debug stuff
Note: See TracChangeset for help on using the changeset viewer.