Changeset 80532d7 in git


Ignore:
Timestamp:
Mar 12, 1998, 3:32:54 PM (25 years ago)
Author:
Jens Schmidt <schmidt@…>
Branches:
(u'spielwiese', '0d6b7fcd9813a1ca1ed4220cfa2b104b97a0a003')
Children:
e0bc8f01c31b06f5bd5223a76007232d262923ac
Parents:
2f58625cdc1cde42e7673759b68e29a39e705314
Message:
	* fac_univar.cc (norm): function removed.  All references replaced
	  by `euclideanNorm()'.


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

Legend:

Unmodified
Added
Removed
  • factory/fac_univar.cc

    r2f5862 r80532d7  
    11/* emacs edit mode for this file is -*- C++ -*- */
    2 /* $Id: fac_univar.cc,v 1.16 1998-02-02 08:58:49 schmidt Exp $ */
     2/* $Id: fac_univar.cc,v 1.17 1998-03-12 14:32:54 schmidt Exp $ */
    33
    44#include <config.h>
     
    147147    return res;
    148148}
    149 
    150 //{{{ static CanonicalForm norm ( const CanonicalForm & f )
    151 //{{{ docu
    152 //
    153 // norm() - return euclidean norm of f.
    154 //
    155 // That is, returns the largest integer smaller or equal
    156 // norm(f) = sqrt(sum( f[i]^2 )).  f should be an univariate
    157 // polynomial over Z.
    158 //
    159 // Used by kbound().
    160 //
    161 //}}}
    162 static CanonicalForm
    163 norm ( const CanonicalForm & f )
    164 {
    165     CFIterator i;
    166     CanonicalForm sum = 0;
    167     for ( i = f; i.hasTerms(); i++ ) sum += i.coeff() * i.coeff();
    168     DEBOUTLN( cerr, "sum = " << sum );
    169     return sqrt( sum );
    170 }
    171 //}}}
    172149
    173150//{{{ static int kBound ( const CanonicalForm & f, int p )
     
    191168kBound ( const CanonicalForm & f, int p )
    192169{
    193     return (int)(f.degree() + (double)(ilog2( norm(f)+1 ) + 1) / (double)ilog2(p)) + 1;
     170    return (int)(f.degree() + (double)(ilog2( euclideanNorm(f)+1 ) + 1) / (double)ilog2(p)) + 1;
    194171}
    195172//}}}
Note: See TracChangeset for help on using the changeset viewer.