source: git/factory/libfac/charset/csutil.h @ dccceb

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