source: git/libfac/charset/csutil.h @ 456842

spielwiese
Last change on this file since 456842 was 4a81ec, checked in by Hans Schönemann <hannes@…>, 27 years ago
* hannes/michael: libfac-0.3.0 git-svn-id: file:///usr/local/Singular/svn/trunk@708 2c84dea3-7e68-4137-9b89-c4e89433aadc
  • Property mode set to 100644
File size: 2.8 KB
Line 
1/* Copyright 1996 Michael Messollen. All rights reserved. */
2////////////////////////////////////////////////////////////
3// emacs edit mode for this file is -*- C++ -*-
4// $Id: csutil.h,v 1.3 1997-09-12 07:19:42 Singular Exp $
5////////////////////////////////////////////////////////////
6
7#ifndef INCL_CSUTIL_H
8#define INCL_CSUTIL_H
9
10#include <factory.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 );
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 & CS);
64CFList         initalset1(const CFList & CS);
65CFList         initalset2(const CFList & CS, const CanonicalForm & reducible);
66int            irreducible( const CFList & AS);
67CFList         select( const ListCFList & PS);
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 &PS, const CFList &CS );
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
78////////////////////////////////////////////////////////////
79/*
80$Log: not supported by cvs2svn $
81Revision 1.3  1997/04/25 22:51:48  michael
82Version for libfac-0.2.1
83
84*/
Note: See TracBrowser for help on using the repository browser.