source: git/libfac/factor.h @ 4c4979

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