Show
Ignore:
Timestamp:
07/02/08 04:21:49 (5 months ago)
Author:
dumas
Message:

Ported to the improved full-multip-cra
(compute the inverse of the product only once)

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/linbox/linbox/algorithms/rational-cra-full-multip.h

    r2778 r2982  
    7575                    std::vector<Integer>::iterator t0_it = num.begin(); 
    7676                    std::vector<Integer>::const_iterator t_it = _tab_it->begin(); 
     77                    Integer invprod; 
     78                    precomputeInvProd(invprod, Product(), _mod_it->operator()() ); 
    7779                    for( ; t0_it != num.end(); ++t0_it, ++t_it) 
    78                         this->normalizesmallbigreconstruct(*t0_it, Product(), *t_it, _mod_it->operator()() ); 
     80                        this->smallbigreconstruct(*t0_it, *t_it, invprod ); 
    7981                    Product.mulin(*_mod_it); 
     82 
     83                    // Moding out and normalization 
     84                    for(t0_it = num.begin();t0_it != num.end(); ++t0_it) { 
     85                        *t0_it %= Product(); 
     86                        Integer tmp(*t0_it); 
     87                        normalize(*t0_it, tmp, Product()); 
     88                    } 
    8089                } 
    8190            }