source: git/libfac/charset/csutil.h @ 18500b

spielwiese
Last change on this file since 18500b was 18500b, checked in by Martin Lee <martinlee84@…>, 12 years ago
chg: moved libfac back
  • Property mode set to 100644
File size: 2.6 KB
Line 
1////////////////////////////////////////////////////////////
2// emacs edit mode for this file is -*- C++ -*-
3////////////////////////////////////////////////////////////
4
5#ifndef INCL_CSUTIL_H
6#define INCL_CSUTIL_H
7
8#include <factory.h>
9#include "algfactor.h"
10#include <tmpl_inst.h>
11
12// inline function's:
13
14inline int 
15cls ( const CanonicalForm & f ){ if ( getNumVars(f) == 0 ) {return 0;} else {return f.level();} }
16
17inline int 
18rank ( const CanonicalForm & f ){ return cls(f); }
19
20inline CanonicalForm
21ini ( const CanonicalForm & f ){ return LC(f); }
22
23inline CanonicalForm
24ini ( const CanonicalForm & f , const Variable v ){ return LC(f,v); }
25
26inline Variable
27lvar ( const CanonicalForm & f ){ return f.mvar(); }
28
29///////////////////////////////////////////////////////////////
30// a class definition needed in charset.cc for Prem
31///////////////////////////////////////////////////////////////
32/*BEGINPUBLIC*/
33
34class PremForm {
35public:
36  CFList FS1;
37  CFList FS2;
38  inline PremForm& operator=( const PremForm&  value ){
39    if ( this != &value ){
40      FS1 = value.FS1;
41      FS2 = value.FS2;
42    }
43    return *this;
44  }
45};
46
47/*ENDPUBLIC*/
48
49// functions from csutil.cc:
50/*BEGINPUBLIC*/
51CanonicalForm  Prem( const CanonicalForm &f, const CanonicalForm &g );
52CanonicalForm  Prem( const CanonicalForm &f, const CFList &L );
53CFList         Prem( const CFList &AS, const CFList &L );
54CanonicalForm alg_gcd(const CanonicalForm &, const CanonicalForm &, const CFList &);
55/*ENDPUBLIC*/
56CanonicalForm  divide( const CanonicalForm & ff, const CanonicalForm & f, const CFList & as);
57CFList         remsetb( const CFList & ps, const CFList & as);
58CanonicalForm  lowestRank( const CFList & F );
59
60CFList         removecontent ( const CFList & PS, PremForm & Remembern );
61void           removefactor( CanonicalForm & r , PremForm & Remembern);
62CFList         factorps( const CFList &ps );
63//CFList         initalset(const CFList & CSet);
64CFList         initalset1(const CFList & CSet);
65CFList         initalset2(const CFList & CSet, const CanonicalForm & reducible);
66int            irreducible( const CFList & ASet);
67CFList         select( const ListCFList & PSet);
68void           select( const ListCFList & ppi, int length, ListCFList & ppi1, 
69                       ListCFList & ppi2);
70bool           same( const CFList &A, const CFList &B );
71bool           member( const CFList & cs, const ListCFList & pi );
72bool           subset( const CFList &PSet, const CFList &CSet );
73ListCFList     MyUnion( const ListCFList & a, const ListCFList &b );
74ListCFList     MyDifference( const ListCFList & a, const CFList &b);
75ListCFList     Minus( const ListCFList & a, const ListCFList &b);
76#endif /* INCL_CSUTIL_H */
77
Note: See TracBrowser for help on using the repository browser.