source: git/libfac/factor.h @ 8de151

spielwiese
Last change on this file since 8de151 was 8de151, checked in by Hans Schönemann <hannes@…>, 17 years ago
*hannes: Factorize2 git-svn-id: file:///usr/local/Singular/svn/trunk@10053 2c84dea3-7e68-4137-9b89-c4e89433aadc
  • 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.h>
8
9// Set this to a nonzero value to interrupt the computation
10extern 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 & mipo, int is_SqrFree=0 ) ;
21CFFList Factorize2(CanonicalForm F, const CanonicalForm & minpoly );
22CFFList newfactoras( const CanonicalForm & f, const CFList & as, int success);
23CFFList factorize2 ( const CanonicalForm & f,
24                     const Variable & alpha, const CanonicalForm & mipo );
25
26
27//// Note: InternalSqrFree does only the work needed for factorization.
28// CFFList SqrFree( const CanonicalForm & f ) ;
29
30typedef List<CFList> ListCFList;
31typedef List<int> IntList ;
32typedef ListIterator<int> IntListIterator ;
33typedef List<Variable> Varlist;
34typedef ListIterator<Variable> VarlistIterator;
35
36////////////////////////////////////////
37/// from charsets:
38
39class PremForm {
40public:
41  CFList FS1;
42  CFList FS2;
43  inline PremForm& operator=( const PremForm&  value ){
44    if ( this != &value ){
45      FS1 = value.FS1;
46      FS2 = value.FS2;
47    }
48    return *this;
49  }
50};
51
52CanonicalForm  Prem( const CanonicalForm &f, const CanonicalForm &g );
53CanonicalForm  Prem( const CanonicalForm &f, const CFList &L );
54CFList         Prem( const CFList &AS, const CFList &L );
55CFList     MCharSetN( const CFList &PS, PremForm & Remembern );
56ListCFList IrrCharSeries( const CFList &PS, int opt=0 );
57
58// the next three give you a heuristically optimal reorderd list of the
59// variables. For internal and external (e.g. Singular/Macaulay2) library use.
60// This is really experimental!
61// See the comments in reorder.cc.
62//
63// this gives you a heuristically optimal ordering for the ring variables
64// if you use the irreducible characteristic series.
65Varlist  neworder( const CFList & PolyList );
66// the same as neworder(...) only returning a list of CanonicalForm 's
67// (i.e. the variables as CanonicalForms)
68CFList   newordercf(const CFList & PolyList );
69// the same as neworder(...) only returning a list of int 's (i.e. the levels)
70IntList  neworderint(const CFList & PolyList );
71
72// for library internal use only:
73// next function reorders the variables in PS:
74// a code segment to use:
75// ...
76// #include <tmpl_inst.h> // for typedef's
77// CFList PS= <setup-your-list-of-CanonicalForms>;
78// Varlist betterorder= neworder(PS);
79// PS= reorder(betterorder,PS); // reorder variables in PS from oldorder
80//                                 to betterorder
81// ListCFList Q= IrrCharSeries( PS );
82// Q= reorder(betterorder,Q);   // revert ordering to oldorder
83//
84CFList reorder( const Varlist & betterorder, const CFList & PS);
85CFFList reorder( const Varlist & betterorder, const CFFList & PS);
86ListCFList reorder(const Varlist & betterorder, const ListCFList & Q);
87
88
89#endif /* FACTOR_H */
Note: See TracBrowser for help on using the repository browser.