Changeset 2992

Show
Ignore:
Timestamp:
07/02/08 06:45:34 (2 months ago)
Author:
dumas
Message:

added #if have NTL

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/linbox/tests/test-smith-form-binary.C

    r2795 r2992  
    166166 
    167167} 
     168#ifdef __LINBOX_HAVE_NTL 
     169#include "linbox/field/ntl-ZZ.h" 
     170#endif 
    168171 
    169172int main(int argc, char** argv) { 
     
    183186                                                                                                         
    184187        parseArguments (argc, argv, args); 
    185                                                                                                          
    186         typedef PID_integer Ring; 
     188         
     189        { 
     190             
     191                                                                                                         
     192        typedef PID_integer Ring; 
     193         
    187194                                                                                               
    188195        Ring R; 
    189196 
    190197        commentator.start("SmithFormBinary test suite", "SmithFormBinary"); 
     198        std::ostream &report = commentator.report (Commentator::LEVEL_IMPORTANT, INTERNAL_DESCRIPTION); 
     199        report << std::endl << "EGV++ algorithm test suite with LinBox/Givaro PID:\n"; 
    191200 
    192201        commentator.getMessageClass (INTERNAL_DESCRIPTION).setMaxDepth (5); 
     
    211220 
    212221        if (!testRandom(R, sf, s1)) pass = false; 
    213                                                                                                          
     222        } 
     223         
     224#ifdef __LINBOX_HAVE_NTL 
     225        { 
     226             
     227                                                                                                         
     228        typedef NTL_ZZ Ring; 
     229 
     230        Ring R; 
     231 
     232        report << std::endl << "EGV++ algorithm test suite with NTL_ZZ :\n"; 
     233 
     234        commentator.getMessageClass (INTERNAL_DESCRIPTION).setMaxDepth (5); 
     235 
     236        RandomDenseStream<Ring> s1 (R, n, iterations); 
     237 
     238        typedef Modular<LinBox::int32> Field; 
     239 
     240        typedef RationalSolver<Ring, Field, LinBox::RandomPrimeIterator> Solver; 
     241 
     242        typedef LastInvariantFactor<Ring, Solver> LIF; 
     243 
     244        typedef OneInvariantFactor<Ring, LIF, SCompose, RandomMatrix>  OIF; 
     245 
     246        typedef SmithFormBinary<Ring, OIF, MatrixRank<Ring, Field > > SF; 
     247 
     248        SF sf; 
     249         
     250        sf.  setOIFThreshold (30); 
     251 
     252        sf. setLIFThreshold  (30); 
     253 
     254        if (!testRandom(R, sf, s1)) pass = false; 
     255        } 
     256#endif 
     257 
    214258        commentator.stop("SmithFormBinary test suite"); 
    215259        return pass ? 0 : -1;