Changeset 9c9e2a4 in git


Ignore:
Timestamp:
Dec 8, 1997, 7:24:47 PM (26 years ago)
Author:
Jens Schmidt <schmidt@…>
Branches:
(u'spielwiese', 'ec94ef7a30b928574c0c3daf41f6804dff5f6b69')
Children:
31a2be7f2a739a97c14524d60b3f53ce30ff4336
Parents:
b7ef56a82852de8fabcb051596fe67049852b346
Message:
^M fix.  Was:
Thu 27.11.1997 22:30:00  Ruediger Stobbe  <rstobbe@de.oracle.com>
Factory Win NT Port, see ChangeLog for details


git-svn-id: file:///usr/local/Singular/svn/trunk@951 2c84dea3-7e68-4137-9b89-c4e89433aadc
Location:
factory
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • factory/cf_factor.cc

    rb7ef56 r9c9e2a4  
    11/* emacs edit mode for this file is -*- C++ -*- */
    2 /* $Id: cf_factor.cc,v 1.7 1997-09-09 09:25:52 schmidt Exp $ */
     2/* $Id: cf_factor.cc,v 1.8 1997-12-08 18:24:23 schmidt Exp $ */
    33
    44//{{{ docu
     
    4545            return FpFactorizeUnivariateB( f, issqrfree );
    4646        else
    47             return FpFactorizeUnivariateCZ( f, issqrfree );
     47            return FpFactorizeUnivariateCZ( f, issqrfree, 0, Variable(), Variable() );
    4848    }
    4949    else {
     
    6060    ASSERT( f.isUnivariate(), "multivariate factorization not implemented" );
    6161    ASSERT( getCharacteristic() > 0, "char 0 factorization not implemented" );
    62     return FpFactorizeUnivariateCZ( f, false, 1, alpha );
     62    return FpFactorizeUnivariateCZ( f, false, 1, alpha, Variable() );
    6363}
    6464
  • factory/cf_random.cc

    rb7ef56 r9c9e2a4  
    11/* emacs edit mode for this file is -*- C++ -*- */
    2 /* $Id: cf_random.cc,v 1.5 1997-10-22 13:44:34 schmidt Exp $ */
     2/* $Id: cf_random.cc,v 1.6 1997-12-08 18:24:25 schmidt Exp $ */
    33
    44#include <config.h>
     
    1616class RandomGenerator {
    1717private:
    18 #ifdef macintosh
    19     // mac does not like const long int in a class
    20     long int ia, im, iq, ir, deflt;
    21 #else
    22     const long int
    23         ia = 16807,
    24         im = 2147483647,
    25         iq = 127773,
    26         ir = 2836,
    27         deflt = 123459876;
    28 #endif
    29    
     18    const long int ia, im, iq, ir, deflt;
    3019    long s;
    3120
     
    3322    void seedInit( long ss ) { s = ((ss == 0) ? deflt : ss); }
    3423public:
    35 #ifdef macintosh
    3624    RandomGenerator();
    3725    RandomGenerator( long ss );
    38 #else
    39     RandomGenerator() { seedInit( (long)time( 0 ) ); }
    40     RandomGenerator( long ss ) { seedInit( ss ); }
    41 #endif
    4226    ~RandomGenerator() {}
    4327    long generate();
     
    4529};
    4630
    47 #ifdef macintosh
    48 RandomGenerator::RandomGenerator()
     31RandomGenerator::RandomGenerator() : ia(16807), im(2147483647), iq(127773), ir(2836), deflt(123459876)
    4932{
    50   ia = 16807;
    51   im = 2147483647;
    52   iq = 127773;
    53   ir = 2836;
    54   deflt = 123459876;
    5533  seedInit( (long)time( 0 ) );
    5634}
    5735
    58 RandomGenerator::RandomGenerator( long ss )
     36RandomGenerator::RandomGenerator( long ss ) : ia(16807), im(2147483647), iq(127773), ir(2836), deflt(123459876)
    5937{
    60   ia = 16807;
    61   im = 2147483647;
    62   iq = 127773;
    63   ir = 2836;
    64   deflt = 123459876;
    6538  seedInit( ss );
    6639}
    67 #endif
    6840
    6941long
  • factory/fac_cantzass.cc

    rb7ef56 r9c9e2a4  
    11/* emacs edit mode for this file is -*- C++ -*- */
    2 /* $Id: fac_cantzass.cc,v 1.3 1997-09-09 09:03:31 schmidt Exp $ */
     2/* $Id: fac_cantzass.cc,v 1.4 1997-12-08 18:24:28 schmidt Exp $ */
    33
    44#include <config.h>
     
    4343static CanonicalForm powerMod2( const CanonicalForm & f, MP_INT * q, int s, const CanonicalForm & d );
    4444
    45 CFFList FpFactorizeUnivariateCZ( const CanonicalForm& f, bool issqrfree, int numext, const Variable & alpha, const Variable & beta )
     45CFFList FpFactorizeUnivariateCZ( const CanonicalForm& f, bool issqrfree, int numext, const Variable alpha, const Variable beta )
    4646{
    4747    CFFList F, G, H, HH;
  • factory/fac_cantzass.h

    rb7ef56 r9c9e2a4  
    11/* emacs edit mode for this file is -*- C++ -*- */
    2 /* $Id: fac_cantzass.h,v 1.2 1997-06-19 12:23:40 schmidt Exp $ */
     2/* $Id: fac_cantzass.h,v 1.3 1997-12-08 18:24:29 schmidt Exp $ */
    33
    44#ifndef INCL_FAC_CANTZASS_H
     
    1010#include "canonicalform.h"
    1111
    12 CFFList FpFactorizeUnivariateCZ( const CanonicalForm& f, bool issqrfree = false, int numext = 0, const Variable & alpha = Variable(), const Variable & beta = Variable() );
     12CFFList FpFactorizeUnivariateCZ( const CanonicalForm& f, bool issqrfree, int numext, const Variable alpha, const Variable beta );
    1313
    1414//CFFList FpFactorizeUnivariateCZ( const CanonicalForm& f );
  • factory/fac_iterfor.cc

    rb7ef56 r9c9e2a4  
    11/* emacs edit mode for this file is -*- C++ -*- */
    2 /* $Id: fac_iterfor.cc,v 1.4 1997-06-19 12:23:33 schmidt Exp $ */
     2/* $Id: fac_iterfor.cc,v 1.5 1997-12-08 18:24:31 schmidt Exp $ */
    33
    44#include <config.h>
     
    2222IteratedFor::IteratedFor( int from, int to, int max ) : MAX( max ), FROM( from ), TO( to ), N( TO-FROM ), last( false )
    2323{
    24     ASSERT( n >= 0 && max >= 0, "illegal iterated for" );
     24    ASSERT( N >= 0 && max >= 0, "illegal iterated for" );
    2525    index = new int[N+1];
    2626    imax = new int[N+1];
  • factory/fac_sqrfree.cc

    rb7ef56 r9c9e2a4  
    11/* emacs edit mode for this file is -*- C++ -*- */
    2 /* $Id: fac_sqrfree.cc,v 1.6 1997-06-19 12:23:21 schmidt Exp $ */
     2/* $Id: fac_sqrfree.cc,v 1.7 1997-12-08 18:24:32 schmidt Exp $ */
    33
    44#include <config.h>
     
    9696}
    9797
    98 int isSqrFreeZ ( const CanonicalForm & f )
     98bool isSqrFreeZ ( const CanonicalForm & f )
    9999{
    100100    return gcd( f, f.deriv() ).degree() == 0;
  • factory/fac_univar.cc

    rb7ef56 r9c9e2a4  
    11/* emacs edit mode for this file is -*- C++ -*- */
    2 /* $Id: fac_univar.cc,v 1.14 1997-09-29 06:53:25 schmidt Exp $ */
     2/* $Id: fac_univar.cc,v 1.15 1997-12-08 18:24:35 schmidt Exp $ */
    33
    44#include <config.h>
     
    451451            setCharacteristic( p[i] );
    452452            fp = mapinto( f );
    453             F[i] = FpFactorizeUnivariateCZ( fp, true );
     453            F[i] = FpFactorizeUnivariateCZ( fp, true, 0, Variable(), Variable() );
    454454//              if ( p[i] < 23 && fp.degree() < 10 )
    455455//                  F[i] = FpFactorizeUnivariateB( fp, true );
    456456//              else
    457 //                  F[i] = FpFactorizeUnivariateCZ( fp, true );
     457//                  F[i] = FpFactorizeUnivariateCZ( fp, true, 0, Variable, Variable() );
    458458            DEBOUTLN( cerr, "F[i] = " << F[i] << ", p = " << p[i] );
    459459        }
  • factory/ffops.cc

    rb7ef56 r9c9e2a4  
    11/* emacs edit mode for this file is -*- C++ -*- */
    2 /* $Id: ffops.cc,v 1.5 1997-10-22 13:42:23 schmidt Exp $ */
     2/* $Id: ffops.cc,v 1.6 1997-12-08 18:24:37 schmidt Exp $ */
    33
    44#include <config.h>
     
    4545int ff_biginv ( const int a )
    4646{
    47     long long int u, r0 = a, r1 = ff_prime, q0 = 1, q1 = 0;
     47    INT64 u, r0 = a, r1 = ff_prime, q0 = 1, q1 = 0;
    4848    while ( ( r0 > 0 ) && ( r1 > 0 ) ) {
    4949        u = r0 / r1;
  • factory/ffops.h

    rb7ef56 r9c9e2a4  
    11/* emacs edit mode for this file is -*- C++ -*- */
    2 /* $Id: ffops.h,v 1.4 1997-09-09 07:06:29 schmidt Exp $ */
     2/* $Id: ffops.h,v 1.5 1997-12-08 18:24:38 schmidt Exp $ */
    33
    44#ifndef INCL_FFOPS_H
     
    4444}
    4545
    46 inline int ff_bignorm ( const long long int a )
     46inline int ff_bignorm ( const INT64 a )
    4747{
    48     int n = (int)(a % (long long int)ff_prime);
     48    int n = (int)(a % (INT64)ff_prime);
    4949    if ( n < 0 )
    5050        return n + ff_prime;
     
    7171{
    7272    if ( ff_big )
    73         return ff_bignorm( (long long int)a * (long long int)b );
     73        return ff_bignorm( (INT64)a * (INT64)b );
    7474    else
    7575        return ff_longnorm ( (long)a * (long)b );
  • factory/readcf.y

    rb7ef56 r9c9e2a4  
    11/* emacs edit mode for this file is -*- C++ -*- */
    2 /* $Id: readcf.y,v 1.4 1997-06-19 12:42:58 schmidt Exp $ */
     2/* $Id: readcf.y,v 1.5 1997-12-08 18:24:42 schmidt Exp $ */
    33
    44%{
     5
     6#ifdef WINNT
     7#include <malloc.h>
     8#include <memory.h>
     9#define alloca _alloca
     10#endif
    511
    612#include <config.h>
  • factory/sm_sparsemod.cc

    rb7ef56 r9c9e2a4  
    11/* emacs edit mode for this file is -*- C++ -*- */
    2 /* $Id: sm_sparsemod.cc,v 1.3 1997-10-09 14:47:19 schmidt Exp $ */
     2/* $Id: sm_sparsemod.cc,v 1.4 1997-12-08 18:24:45 schmidt Exp $ */
    33
    44//{{{ docu
     
    380380    return N( gcd( primif, primig ) );
    381381
    382   int varf[ levis ], varg[ levis ], schnitt[ levis ];
     382  int * varf = new int[levis];
     383  int * varg = new int[levis];
     384  int * schnitt = new int[levis];
    383385
    384386  while ( ABFRAGE == 1 )
     
    433435    }
    434436
    435 
    436 
     437 
     438  delete [] varf; delete [] varg; delete [] schnitt;
    437439
    438440
  • factory/timing.h

    rb7ef56 r9c9e2a4  
    11/* emacs edit mode for this file is -*- C++ -*- */
    2 /* $Id: timing.h,v 1.3 1997-06-19 12:21:54 schmidt Exp $ */
     2/* $Id: timing.h,v 1.4 1997-12-08 18:24:47 schmidt Exp $ */
    33
    44/* It should be possible to include this file multiple times for different */
     
    1414#ifdef TIMING
    1515#include <time.h>
     16#ifndef WINNT
    1617#include <sys/times.h>
    1718#include <sys/param.h>
     19#endif
    1820#include <stdio.h>
    1921
     
    3436#endif
    3537
     38#ifdef WINNT
     39#define TIMING_START(t) { clock_t timing_ ## t ## _start, timing_ ## t ## _end; \
     40  timing_ ## t ## _start = clock();
     41#define TIMING_END(t) timing_ ## t ## _end = clock(); \
     42timing_ ## t ## _time += timing_ ## t ## _end - timing_ ## t ## _start; }
     43#define TIMING_DEFINE_PRINT(t) clock_t timing_ ## t ## _time; \
     44void timing_print_ ## t ( char * msg ) { \
     45  fprintf( stderr, "%s%.2f sec\n", msg, float(timing_ ## t ## _time) / HZ ); \
     46}
     47#define TIMING_DEFINE_PRINTPROTO(t) void timing_print_ ## t ( char * );
     48#define TIMING_PRINT(t, msg) timing_print_ ## t ( msg );
     49#else
    3650#define TIMING_START(t) { struct tms timing_ ## t ## _start, timing_ ## t ## _end; \
    3751  times( &timing_ ## t ## _start );
     
    4862#define TIMING_DEFINE_PRINTPROTO(t) void timing_print_ ## t ( char * );
    4963#define TIMING_PRINT(t, msg) timing_print_ ## t ( msg );
     64#endif
    5065#else /* TIMING */
    5166#define TIMING_START(t)
Note: See TracChangeset for help on using the changeset viewer.