source: git/factory/libfac/libfac.h @ 1ba7d5

fieker-DuValspielwiese
Last change on this file since 1ba7d5 was c623e3e, checked in by Hans Schoenemann <hannes@…>, 11 years ago
fix: mac osx port: need extern int in a c file (D, not C code part)
  • Property mode set to 100644
File size: 3.1 KB
Line 
1// Header file for libfac.a
2// Created by -- makeheader --
3///////////////////////////////////////
4#ifndef FACTOR_H
5#define FACTOR_H
6
7#include <factory/factory.h>
8
9// Set this to a nonzero value to interrupt the computation
10extern "C" int libfac_interruptflag;
11
12// some values you can ask for:
13extern const char * libfac_name;
14extern const char * libfac_version;
15extern const char * libfac_date;
16extern const char * libfac_author;
17
18//// Note: second argument for Factorize is for internal use only.
19CFFList Factorize( const CanonicalForm & F, int is_SqrFree=0 ) ;
20CFFList Factorize( const CanonicalForm & F, const CanonicalForm & mi, int is_SqrFree=0 ) ;
21
22//// Note: InternalSqrFree does only the work needed for factorization.
23// CFFList SqrFree( const CanonicalForm & f ) ;
24CFFList SqrFreeMV( const CanonicalForm & f , const CanonicalForm & mipo=0) ;
25
26typedef List<CFList> ListCFList;
27typedef List<int> IntList ;
28typedef ListIterator<int> IntListIterator ;
29typedef List<Variable> Varlist;
30typedef ListIterator<Variable> VarlistIterator;
31
32////////////////////////////////////////
33/// from charsets:
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
48CanonicalForm  Prem( const CanonicalForm &f, const CanonicalForm &g );
49CanonicalForm  Prem( const CanonicalForm &f, const CFList &L );
50CFList         Prem( const CFList &AS, const CFList &L );
51CanonicalForm alg_gcd(const CanonicalForm &, const CanonicalForm &, const CFList &);
52CFList     MCharSetN( const CFList &PS, PremForm & Remembern );
53ListCFList IrrCharSeries( const CFList &PS, int opt=0 );
54
55// the next three give you a heuristically optimal reorderd list of the
56// variables. For internal and external (e.g. Singular/Macaulay2) library use.
57// This is really experimental!
58// See the comments in reorder.cc.
59//
60// this gives you a heuristically optimal ordering for the ring variables
61// if you use the irreducible characteristic series.
62Varlist  neworder( const CFList & PolyList );
63// the same as neworder(...) only returning a list of CanonicalForm 's
64// (i.e. the variables as CanonicalForms)
65CFList   newordercf(const CFList & PolyList );
66// the same as neworder(...) only returning a list of int 's (i.e. the levels)
67IntList  neworderint(const CFList & PolyList );
68
69// for library internal use only:
70// next function reorders the variables in PS:
71// a code segment to use:
72// ...
73// #include <tmpl_inst.h> // for typedef's
74// CFList PS= <setup-your-list-of-CanonicalForms>;
75// Varlist betterorder= neworder(PS);
76// PS= reorder(betterorder,PS); // reorder variables in PS from oldorder
77//                                 to betterorder
78// ListCFList Q= IrrCharSeries( PS );
79// Q= reorder(betterorder,Q);   // revert ordering to oldorder
80//
81CFList reorder( const Varlist & betterorder, const CFList & PS);
82CFFList reorder( const Varlist & betterorder, const CFFList & PS);
83ListCFList reorder(const Varlist & betterorder, const ListCFList & Q);
84
85int hasVar(const CanonicalForm &f, const Variable &v);
86
87#endif /* FACTOR_H */
Note: See TracBrowser for help on using the repository browser.