Changeset 9fddd9 in git


Ignore:
Timestamp:
Sep 29, 1997, 6:06:41 PM (27 years ago)
Author:
Jens Schmidt <schmidt@…>
Branches:
(u'fieker-DuVal', '117eb8c30fc9e991c4decca4832b1d19036c4c65')(u'spielwiese', 'c7af8613769b29c741d6c338945669719f1fc4f8')
Children:
424e5c278e7700cff91936a8d7f05c2b98fa3ea7
Parents:
b324a188f656b6a148c6f3c5d2cc340c1679c812
Message:
	* canonicalform.h: doc fix

	* cf_ops.cc (size( CF ), size( CF, Var )): new functions.
	  Declarations added.


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

Legend:

Unmodified
Added
Removed
  • factory/canonicalform.h

    rb324a18 r9fddd9  
    11/* emacs edit mode for this file is -*- C++ -*- */
    2 /* $Id: canonicalform.h,v 1.16 1997-09-09 08:40:54 schmidt Exp $ */
     2/* $Id: canonicalform.h,v 1.17 1997-09-29 16:06:41 schmidt Exp $ */
    33
    44#ifndef INCL_CANONICALFORM_H
     
    3333class InternalCF;
    3434
    35 class CanonicalForm {
     35//{{{ class CanonicalForm
     36class CanonicalForm
     37{
    3638private:
    3739    InternalCF *value;
     
    143145    friend class CFIterator;
    144146};
     147//}}}
    145148
    146149// some useful functions
    147150
     151//{{{ function declarations from canonicalform.cc
     152CanonicalForm power ( const CanonicalForm & f, int n );
     153
     154CanonicalForm power ( const Variable & v, int n );
     155
     156bool divides ( const CanonicalForm & f, const CanonicalForm & g );
     157//}}}
     158
     159//{{{ function declarations from cf_gcd.cc
     160CanonicalForm gcd ( const CanonicalForm&, const CanonicalForm& );
     161
     162CanonicalForm extgcd ( const CanonicalForm&, const CanonicalForm&, CanonicalForm&, CanonicalForm& );
     163
     164CanonicalForm iextgcd ( const CanonicalForm&, const CanonicalForm&, CanonicalForm&, CanonicalForm& );
     165
     166CanonicalForm lcm ( const CanonicalForm&, const CanonicalForm& );
     167
     168CanonicalForm pp ( const CanonicalForm& );
     169
     170CanonicalForm content ( const CanonicalForm& );
     171
     172CanonicalForm content ( const CanonicalForm&, const Variable& );
     173
     174CanonicalForm icontent ( const CanonicalForm & f );
     175//}}}
     176
     177//{{{ function declarations from cf_ops.cc
     178CanonicalForm swapvar ( const CanonicalForm &, const Variable &, const Variable & );
     179
     180CanonicalForm replacevar ( const CanonicalForm &, const Variable &, const Variable & );
     181
     182int getNumVars( const CanonicalForm & f );
     183
     184CanonicalForm getVars( const CanonicalForm & f );
     185
     186CanonicalForm apply ( const CanonicalForm & f, void (*mf)( CanonicalForm &, int & ) );
     187
     188CanonicalForm mapdomain ( const CanonicalForm & f, CanonicalForm (*mf)( const CanonicalForm & ) );
     189
     190int * degrees ( const CanonicalForm & f, int * degs = 0 );
     191
     192int totaldegree ( const CanonicalForm & f );
     193
     194int totaldegree ( const CanonicalForm & f, const Variable & v1, const Variable & v2 );
     195
     196int size ( const CanonicalForm & f, const Variable & v );
     197
     198int size ( const CanonicalForm & f );
     199//}}}
     200
     201//{{{ inline functions
    148202inline CanonicalForm
    149203lc ( const CanonicalForm & f ) { return f.lc(); }
     
    161215degree ( const CanonicalForm & f, const Variable & v ) { return f.degree( v ); }
    162216
    163 int totaldegree ( const CanonicalForm & f );
    164 
    165 int totaldegree ( const CanonicalForm & f, const Variable & v1, const Variable & v2 );
    166 
    167217inline int
    168218taildegree ( const CanonicalForm & f ) { return f.taildegree(); }
     
    171221tailcoeff ( const CanonicalForm & f ) { return f.tailcoeff(); }
    172222
    173 CanonicalForm power ( const CanonicalForm & f, int n );
    174 
    175 CanonicalForm power ( const Variable & v, int n );
     223inline int
     224level ( const CanonicalForm & f ) { return f.level(); }
     225
     226inline CanonicalForm
     227mvar ( const CanonicalForm & f ) { return f.mvar(); }
     228
     229inline CanonicalForm
     230num ( const CanonicalForm & f ) { return f.num(); }
     231
     232inline CanonicalForm
     233den ( const CanonicalForm & f ) { return f.den(); }
     234
     235inline CanonicalForm
     236mapinto ( const CanonicalForm & f ) { return f.mapinto(); }
     237
     238//{{{ inline CanonicalForm deriv ( const CanonicalForm & f, const Variable & x )
     239//{{{ docu
     240//
     241// deriv() - inline function version of method deriv().
     242//
     243//}}}
     244inline CanonicalForm
     245deriv ( const CanonicalForm & f, const Variable & x )
     246{
     247    return f.deriv(x);
     248}
     249//}}}
     250
     251//{{{ inline CanonicalForm sqrt ( const CanonicalForm & a )
     252//{{{ docu
     253//
     254// sqrt() - inline function version of method sqrt().
     255//
     256//}}}
     257inline CanonicalForm
     258sqrt ( const CanonicalForm & a )
     259{
     260    return a.sqrt();
     261}
     262//}}}
     263
     264//{{{ inline int ilog2 ( const CanonicalForm & a )
     265//{{{ docu
     266//
     267// ilog2() - inline function version of method ilog().
     268//
     269//}}}
     270inline int
     271ilog2 ( const CanonicalForm & a )
     272{
     273    return a.ilog2();
     274}
     275//}}}
    176276
    177277inline CanonicalForm
     
    184284}
    185285
    186 inline int
    187 headdegree ( const CanonicalForm & f ) { return totaldegree( head( f ) ); }
    188 
    189 inline int
    190 level ( const CanonicalForm & f ) { return f.level(); }
    191 
    192 inline CanonicalForm
    193 mvar ( const CanonicalForm & f ) { return f.mvar(); }
    194 
    195 inline CanonicalForm
    196 num ( const CanonicalForm & f ) { return f.num(); }
    197 
    198 inline CanonicalForm
    199 den ( const CanonicalForm & f ) { return f.den(); }
    200 
    201 inline CanonicalForm
    202 mapinto ( const CanonicalForm & f ) { return f.mapinto(); }
    203 
    204 CanonicalForm swapvar ( const CanonicalForm &, const Variable &, const Variable & );
    205 
    206 CanonicalForm replacevar ( const CanonicalForm &, const Variable &, const Variable & );
    207 
    208 CanonicalForm gcd ( const CanonicalForm&, const CanonicalForm& );
    209 
    210 CanonicalForm extgcd ( const CanonicalForm&, const CanonicalForm&, CanonicalForm&, CanonicalForm& );
    211 
    212 CanonicalForm iextgcd ( const CanonicalForm&, const CanonicalForm&, CanonicalForm&, CanonicalForm& );
    213 
    214 CanonicalForm lcm ( const CanonicalForm&, const CanonicalForm& );
    215 
    216 CanonicalForm pp ( const CanonicalForm& );
    217 
    218 CanonicalForm content ( const CanonicalForm& );
    219 
    220 CanonicalForm content ( const CanonicalForm&, const Variable& );
    221 
    222 CanonicalForm icontent ( const CanonicalForm & f );
    223 
    224 CanonicalForm apply ( const CanonicalForm & f, void (*mf)( CanonicalForm &, int & ) );
    225 
    226 CanonicalForm mapdomain ( const CanonicalForm & f, CanonicalForm (*mf)( const CanonicalForm & ) );
    227 
    228 bool divides ( const CanonicalForm & f, const CanonicalForm & g );
    229 
    230 //{{{ inline CanonicalForm deriv ( const CanonicalForm & f, const Variable & x )
    231 //{{{ docu
    232 //
    233 // deriv() - inline function version of method deriv().
    234 //
    235 //}}}
    236 inline CanonicalForm
    237 deriv ( const CanonicalForm & f, const Variable & x )
    238 {
    239     return f.deriv(x);
    240 }
    241 //}}}
    242 
    243286inline CanonicalForm
    244287abs ( const CanonicalForm & f )
     
    250293}
    251294
    252 //{{{ inline CanonicalForm sqrt ( const CanonicalForm & a )
    253 //{{{ docu
    254 //
    255 // sqrt() - inline function version of method sqrt().
    256 //
    257 //}}}
    258 inline CanonicalForm
    259 sqrt ( const CanonicalForm & a )
    260 {
    261     return a.sqrt();
    262 }
    263 //}}}
    264 
    265 //{{{ inline int ilog2 ( const CanonicalForm & a )
    266 //{{{ docu
    267 //
    268 // ilog2() - inline function version of method ilog().
    269 //
    270 //}}}
    271 inline int
    272 ilog2 ( const CanonicalForm & a )
    273 {
    274     return a.ilog2();
    275 }
    276 //}}}
    277 
    278 int getNumVars( const CanonicalForm & f );
    279 CanonicalForm getVars( const CanonicalForm & f );
    280 
    281 int * degrees ( const CanonicalForm & f, int * degs = 0 );
    282 
    283 //CanonicalForm norm( const CanonicalForm & );
    284 
    285 //CanonicalForm igcd( const CanonicalForm & );
    286 
    287 //CanonicalForm ff2z( const CanonicalForm & );
    288 //CanonicalForm z2ff( const CanonicalForm & );
    289 
     295inline int
     296headdegree ( const CanonicalForm & f ) { return totaldegree( head( f ) ); }
     297//}}}
     298
     299//{{{ other function declarations
    290300void setCharacteristic( int c ); // -> Fp && Q
    291301void setCharacteristic( int c, int n ); // -> PrimePower
     
    294304int getCharacteristic();
    295305int getGFDegree();
    296 
    297306CanonicalForm getGFGenerator();
    298307
    299 // misc template stuff for inst file
    300 
     308void On( int );
     309void Off( int );
     310bool isOn( int );
     311//}}}
     312
     313//{{{ type definitions
    301314typedef Factor<CanonicalForm> CFFactor;
    302315typedef List<CFFactor> CFFList;
     
    306319typedef Array<CanonicalForm> CFArray;
    307320typedef Matrix<CanonicalForm> CFMatrix;
    308 
    309 void On( int );
    310 void Off( int );
    311 bool isOn( int );
     321//}}}
    312322
    313323/*ENDPUBLIC*/
Note: See TracChangeset for help on using the changeset viewer.