source: git/libfac/factor.h @ f3a8c2e

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