Changeset 3bf64a6 in git for factory/cf_linsys.cc


Ignore:
Timestamp:
Mar 26, 1997, 5:46:46 PM (27 years ago)
Author:
Jens Schmidt <schmidt@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
997ae52cc016de635cf7ac2687d7d95c40adbeaf
Parents:
2774a5efedabf00a28e744ed367ffce6ba3d7a58
Message:
debug output rewritten
debug output changed to DEBOUT


git-svn-id: file:///usr/local/Singular/svn/trunk@86 2c84dea3-7e68-4137-9b89-c4e89433aadc
File:
1 edited

Legend:

Unmodified
Added
Removed
  • factory/cf_linsys.cc

    r2774a5 r3bf64a6  
    11// emacs edit mode for this file is -*- C++ -*-
    2 // $Id: cf_linsys.cc,v 1.3 1996-12-05 18:24:54 schmidt Exp $
     2// $Id: cf_linsys.cc,v 1.4 1997-03-26 16:46:46 schmidt Exp $
    33
    44/*
    55$Log: not supported by cvs2svn $
     6Revision 1.3  1996/12/05 18:24:54  schmidt
     7``Unconditional'' check-in.
     8Now it is my turn to develop factory.
     9
    610Revision 1.2  1996/07/15 08:33:18  stobbe
    711"changed interface to linearSystemSolve to use the class CFMatrix
     
    1721*/
    1822
    19 #define TIMING
    20 
     23#include "assert.h"
     24#include "debug.h"
    2125#include "timing.h"
    2226
    23 #include "assert.h"
    2427#include "cf_defs.h"
     28
    2529#include "cf_primes.h"
    2630#include "canonicalform.h"
     
    138142        pno = 0;
    139143        do {
    140             DEBOUT( cerr, "trying prime(", pno ); DEBOUTLN( cerr, ") = ", ' ' );
     144            DEBOUTSL( cerr );
     145            DEBOUT( cerr, "trying prime(" << pno << ") = " );
    141146            p = cf_getBigPrime( pno );
    142             cout << p << endl;
     147            DEBOUT( cerr, p );
     148            DEBOUTENDL( cerr );
    143149            setCharacteristic( p );
    144150            // map matrix into char p
     
    159165        while ( Q < B && pno < cf_getNumBigPrimes() ) {
    160166            do {
    161                 cout << "trying prime(" << pno << ") = " << flush;
     167                DEBOUTSL( cerr );
     168                DEBOUT( cerr, "trying prime(" << pno << ") = " );
    162169                p = cf_getBigPrime( pno );
    163                 cout << p << endl;
     170                DEBOUT( cerr, p );
     171                DEBOUTENDL( cerr );
    164172                setCharacteristic( p );
    165173                for ( i = 0; i < rows; i++ )
     
    215223    return ok;
    216224}
    217        
     225
    218226CanonicalForm
    219227determinant( const CFMatrix & M, int rows )
     
    244252
    245253        CFArray X(1,n), Q(1,n);
    246        
     254
    247255        while ( pno < n ) {
    248256            p = cf_getBigPrime( pno );
     
    253261            TIMING_END(det_mapping);
    254262            pno++;
    255             cerr << "."; cerr.flush();
     263            DEBOUT( cerr, "." );
    256264            TIMING_START(det_determinant);
    257265            intdet = determinant( mm, rows );
     
    341349        // initialize the result matrix with first solution
    342350        // solve mod p
    343         cerr << "."; cerr.flush();
     351        DEBOUT( cerr, "." );
    344352        intdet = determinant( mm, rows );
    345353        setCharacteristic( 0 );
     
    359367            // initialize the result matrix with first solution
    360368            // solve mod p
    361             cerr << "."; cerr.flush();
     369            DEBOUT( cerr, "." );
    362370            intdet = determinant( mm, rows );
    363371            setCharacteristic( 0 );
     
    377385                } while ( ! ok && cf_getNumPrimes() > pno );
    378386                // solve mod p
    379                 cerr << "."; cerr.flush();
     387                DEBOUT( cerr, "." );
    380388                intdet = determinant( mm, rows );
    381389                // found a solution mod p
     
    388396                pcount++;
    389397            }
    390             cerr << "*"; cerr.flush();
     398            DEBOUT( cerr, "*" );
    391399            chineseRemainder( det, Q, qdet, q, detnew, qnew );
    392400            Q = qnew;
     
    537545    multiplier = 1;
    538546    divisor = 1;
    539    
     547
    540548    for ( i = 0; i < n; i++ ) {
    541549        //find "pivot"
Note: See TracChangeset for help on using the changeset viewer.