Changeset 041dbdc in git for factory


Ignore:
Timestamp:
Mar 12, 1998, 11:26:47 AM (26 years ago)
Author:
Jens Schmidt <schmidt@…>
Branches:
(u'spielwiese', 'e7cc1ebecb61be8b9ca6c18016352af89940b21a')
Children:
e7232f5348c7b68d627b5f9df4f8cceceba610c9
Parents:
97194345e85a42bf5f6feac310528de922da216a
Message:
	* cf_algorithm.cc (cden, common_den): renamed to
	  `internalBCommonDen()' and `bCommonDen()', resp.  Declarations
	  adapted. All references changed.

	* cf_algorithm.h (abs): function `abs()' moved from
	  `canonicalform.h' to `cf_algorithm.h'.  All referring files
	  include `cf_algorithm.h'.

	* cf_algorithm.cc (maxNorm, euclideanNorm): new functions.
	  Declarations added.


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

Legend:

Unmodified
Added
Removed
  • factory/cf_algorithm.h

    r9719434 r041dbdc  
    11/* emacs edit mode for this file is -*- C++ -*- */
    2 /* $Id: cf_algorithm.h,v 1.9 1998-01-16 08:56:34 schmidt Exp $ */
     2/* $Id: cf_algorithm.h,v 1.10 1998-03-12 10:26:47 schmidt Exp $ */
    33
    44#ifndef INCL_CF_ALGORITHM_H
     
    1111// This header file collects declarations of most of the
    1212// functions in factory which implement higher level algorithms
    13 // on canonical forms (factorization, gcd, etc.).
     13// on canonical forms (factorization, gcd, etc.) and declarations
     14// of some low level mathematical functions, too (absolute vale,
     15// euclidean norm, etc.).
    1416//
    1517// This header file corresponds to:
     
    3436void psqr ( const CanonicalForm & f, const CanonicalForm & g, CanonicalForm & q, CanonicalForm & r, const Variable & x );
    3537
    36 CanonicalForm common_den ( const CanonicalForm & f );
     38CanonicalForm bCommonDen ( const CanonicalForm & f );
    3739
    3840bool divides ( const CanonicalForm & f, const CanonicalForm & g );
     41
     42CanonicalForm maxNorm ( const CanonicalForm & f );
     43
     44CanonicalForm euclideanNorm ( const CanonicalForm & f );
    3945//}}}
    4046
     
    6773//}}}
    6874
     75//{{{ inline CanonicalForm abs ( const CanonicalForm & f )
     76//{{{ docu
     77//
     78// abs() - return absolute value of `f'.
     79//
     80// The absolute value is defined in terms of the function
     81// `sign()'.  If it reports negative sign for `f' than -`f' is
     82// returned, otherwise `f'.
     83//
     84// Most useful for integers and rationals.  May be used to
     85// sign-normalize the leading coefficient of arbitrary
     86// polynomials, too.
     87//
     88//}}}
     89inline CanonicalForm
     90abs ( const CanonicalForm & f )
     91{
     92    // it is not only more general using `sign()', it is faster, too
     93    if ( sign( f ) < 0 )
     94        return -f;
     95    else
     96        return f;
     97}
     98//}}}
     99
    69100/*ENDPUBLIC*/
    70101
Note: See TracChangeset for help on using the changeset viewer.