1 /* *****************************************************************
2 
3    This file, and all other pel*.h and pel*.cc files in the Gambit
4 source code, are derived from the source code for Pelican, an
5 implementation of the Huber-Sturmfels algorithm for solving sparse
6 systems of polynomials written by Birk Huber.  That code in turn
7 incorporated the source code for HOMPACK and Qhull, which are included
8 here after being modified in the construction of both Pelican and
9 Gambit.  We are grateful to the authors of Pelican, Qhull, and
10 HOMPACK, for code that has been enormously useful in Gambit.
11     More information about Qhull can be obtained from:
12 
13 http://www.geom.edu/software/qhull/
14 
15     For more information concerning HOMPACK see:
16 
17 http://netlib2.cs.utk.edu/hompack/
18 
19 ***************************************************************** */
20 
21 /*
22 **    copyright (c) 1995  Birk Huber
23 */
24 
25 /*
26 ** System.h    interface to psys class
27 **             requires Dvector.
28 */
29 #ifndef PSYS_INC
30 #define PSYS_INC 1
31 #define DMATRIX_FAST 1
32 
33 #include "pelutils.h"
34 
35 #define psys_outfile stdout
36 #define psys_logfile stdout
37 
38 typedef struct psys_t *psys;
39 
40 /* These declarations are added to get compilation.  Linking is another matter... */
41 int HPK_cont(Dvector, int tweak);
42 int init_hom(psys);
43 
44 /* creator/destructor*/
45 void psys_free(psys);
46 psys psys_new(int,int,int);
47 int psys_init_mon(psys);
48 void psys_save_mon(psys,int);
49 /*
50 psys psys_block_init(psys);
51 */
52 psys psys_fprint(FILE *,psys);
53 #define psys_print(p) (psys_fprint(psys_outfile,p))
54 psys psys_copy(psys);
55 /* access functions */
56 #define FORALL_POLY(sys,stmts) psys_start_poly(sys); do { stmts } while(psys_next_poly(sys)==TRUE);
57 #define FORALL_MONO(sys,stmts) psys_start_mon(sys); do { stmts } while(psys_next_mon(sys)==TRUE);
58 #define FORALL_BLOCK(sys,stmts) psys_start_block(sys); do { stmts } while(psys_next_block(sys)==TRUE);
59 
60   int psys_d(psys);
61   int psys_r(psys);
62   int psys_eqno(psys);
63   int psys_set_eqno(psys,int);
64   int psys_size(psys);
65   int psys_start_poly(psys);
66   int psys_start_mon(psys);
67   int psys_start_block(psys);
68   int psys_next_poly(psys);
69   int psys_next_block(psys);
70   int psys_Bstart_poly(psys,int);
71   int psys_Bnext_poly(psys,int);
72   int psys_next_mon(psys);
73   double *psys_coef_real(psys);
74   double *psys_coef_imag(psys);
75   void **psys_aux(psys);
76   int *psys_exp(psys,int);
77   int *psys_homog(psys);
78   int *psys_def(psys);
79   int psys_block_size(psys);
80   int *psys_block_start(psys,int);
81   int psys_bkno(psys);
82   int psys_eq_size(psys);
83   Ivector psys_type(psys);
84 
85 /* transformations */
86 Dvector psys_scale(psys);
87 psys psys_lift(psys,int);
88 psys psys_lead(psys);
89 psys psys_saturate(psys);
90 psys psys_norm_sub(psys,Ivector);
91 aset psys_to_aset(psys P);
92 psys aset_to_psys(aset A,Ivector T, int seed);
93 node psys_binsolve(psys sys);
94 node psys_hom(psys sys, node point_list, int tweak); /* tweaks homotopy */
95 node psys_solve(psys sys, Imatrix norm, int tweak);
96 
97 /* evaluators */
98 Dmatrix psys_jac(psys,Dvector,Dmatrix);
99 double psys_abs(psys,Dvector);
100 Dvector psys_eval(psys,Dvector,Dvector);
101 Dvector psys_moment(psys,Dvector,Dvector); /*untried*/
102 
103 #endif
104