source: git/libfac/charset/csutil.h @ 91b36d

spielwiese
Last change on this file since 91b36d was 91b36d, checked in by Hans Schönemann <hannes@…>, 16 years ago
*hannes: licence stuff git-svn-id: file:///usr/local/Singular/svn/trunk@10750 2c84dea3-7e68-4137-9b89-c4e89433aadc
  • Property mode set to 100644
File size: 3.1 KB
Line 
1////////////////////////////////////////////////////////////
2// emacs edit mode for this file is -*- C++ -*-
3// $Id: csutil.h,v 1.6 2008-06-10 14:49:15 Singular Exp $
4////////////////////////////////////////////////////////////
5
6#ifndef INCL_CSUTIL_H
7#define INCL_CSUTIL_H
8
9#include <factory.h>
10#include "algfactor.h"
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 );
55CanonicalForm alg_gcd(const CanonicalForm &, const CanonicalForm &, const CFList &);
56/*ENDPUBLIC*/
57CanonicalForm  divide( const CanonicalForm & ff, const CanonicalForm & f, const CFList & as);
58CFList         remsetb( const CFList & ps, const CFList & as);
59CanonicalForm  lowestRank( const CFList & F );
60
61CFList         removecontent ( const CFList & PS, PremForm & Remembern );
62void           removefactor( CanonicalForm & r , PremForm & Remembern);
63CFList         factorps( const CFList &ps );
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);
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 );
73bool           subset( const CFList &PSet, const CFList &CSet );
74ListCFList     MyUnion( const ListCFList & a, const ListCFList &b );
75ListCFList     MyDifference( const ListCFList & a, const CFList &b);
76ListCFList     Minus( const ListCFList & a, const ListCFList &b);
77#endif /* INCL_CSUTIL_H */
78
79////////////////////////////////////////////////////////////
80/*
81$Log: not supported by cvs2svn $
82Revision 1.5  2006/06/14 15:35:08  Singular
83*hannes: CS renamed
84
85Revision 1.4  2002/08/19 11:11:32  Singular
86* hannes/pfister: alg_gcd etc.
87
88Revision 1.3  1997/09/12 07:19:42  Singular
89* hannes/michael: libfac-0.3.0
90
91Revision 1.3  1997/04/25 22:51:48  michael
92Version for libfac-0.2.1
93
94*/
Note: See TracBrowser for help on using the repository browser.