source: git/libfac/charset/csutil.h @ 3e55bc

spielwiese
Last change on this file since 3e55bc was 3e55bc, checked in by Hans Schönemann <hannes@…>, 27 years ago
* hannes/michael: libfac 0.2.4 git-svn-id: file:///usr/local/Singular/svn/trunk@377 2c84dea3-7e68-4137-9b89-c4e89433aadc
  • Property mode set to 100644
File size: 2.6 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.2 1997-06-09 15:55:55 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  lowestRank( const CFList & F );
57
58CFList         removecontent ( const CFList & PS, PremForm & Remembern );
59void           removefactor( CanonicalForm & r , PremForm & Remembern);
60CFList         factorps( const CFList &ps );
61//CFList         initalset(const CFList & CS);
62CFList         initalset1(const CFList & CS);
63CFList         initalset2(const CFList & CS, const CanonicalForm & reducible);
64int            irreducible( const CFList & AS);
65CFList         select( const ListCFList & PS);
66void select( const ListCFList & ppi, int length, ListCFList & ppi1, ListCFList & ppi2);
67bool same( const CFList &A, const CFList &B );
68bool member( const CFList & cs, const ListCFList & pi );
69bool           subset( const CFList &PS, const CFList &CS );
70ListCFList MyUnion( const ListCFList & a, const ListCFList &b );
71ListCFList MyDifference( const ListCFList & a, const CFList &b);
72ListCFList Minus( const ListCFList & a, const ListCFList &b);
73#endif /* INCL_CSUTIL_H */
74
75////////////////////////////////////////////////////////////
76/*
77$Log: not supported by cvs2svn $
78Revision 1.3  1997/04/25 22:51:48  michael
79Version for libfac-0.2.1
80
81*/
Note: See TracBrowser for help on using the repository browser.