~ubuntu-branches/ubuntu/feisty/gnumeric/feisty-updates

« back to all changes in this revision

Viewing changes to src/tools/solver/glpk/include/glplib.h

  • Committer: Bazaar Package Importer
  • Author(s): Gauvain Pocentek
  • Date: 2006-11-14 14:02:03 UTC
  • mfrom: (1.1.5 upstream)
  • Revision ID: james.westby@ubuntu.com-20061114140203-iv3j2aii3vch6isl
Tags: 1.7.2-1ubuntu1
* Merge with debian experimental:
  - debian/control, debian/*-gtk-*, debian/rules,
    debian/shlibs.local: Xubuntu changes for
    gtk/gnome multibuild.
  - run intltool-update in po*
  - Build Depend on intltool

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* glplib.h */
 
1
/* glplib.h (miscellaneous low-level routines) */
2
2
 
3
3
/*----------------------------------------------------------------------
 
4
-- This code is part of GNU Linear Programming Kit (GLPK).
4
5
--
 
6
-- Copyright (C) 2000, 01, 02, 03, 04, 05, 06 Andrew Makhorin,
 
7
-- Department for Applied Informatics, Moscow Aviation Institute,
 
8
-- Moscow, Russia. All rights reserved. E-mail: <mao@mai2.rcnet.ru>.
5
9
--
6
10
-- GLPK is free software; you can redistribute it and/or modify it
7
11
-- under the terms of the GNU General Public License as published by
20
20
-- You should have received a copy of the GNU General Public License
21
21
-- along with GLPK; see the file COPYING. If not, write to the Free
22
22
-- Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
 
23
-- 02110-1301, USA.
23
24
----------------------------------------------------------------------*/
24
25
 
25
26
#ifndef _GLPLIB_H
36
36
#define lib_init_env          glp_lib_init_env
37
37
#define lib_env_ptr           glp_lib_env_ptr
38
38
#define lib_free_env          glp_lib_free_env
 
39
#define lib_open_hardcopy     glp_lib_open_hardcopy
 
40
#define lib_close_hardcopy    glp_lib_close_hardcopy
39
41
#define print                 glp_lib_print
40
42
#define lib_set_print_hook    glp_lib_set_print_hook
41
43
#define fault                 glp_lib_fault
50
52
#define str2dbl               glp_lib_str2dbl
51
53
#define strspx                glp_lib_strspx
52
54
#define strtrim               glp_lib_strtrim
53
 
#define lib_init_rand         glp_lib_init_rand
54
 
#define lib_next_rand         glp_lib_next_rand
55
 
#define lib_unif_rand         glp_lib_unif_rand
 
55
#define fp2rat                glp_lib_fp2rat
 
56
#define write_bmp16           glp_lib_write_bmp16
56
57
 
57
58
typedef struct LIBENV LIBENV;
58
59
typedef struct LIBMEM LIBMEM;
66
67
      /* user-defined hook routines */
67
68
      void *print_info;
68
69
      /* transit pointer passed to the routine print_hook */
69
 
      int (*print_hook)(void *info, const char *msg);
 
70
      int (*print_hook)(void *info, char *msg);
70
71
      /* user-defined print hook routine */
71
72
      void *fault_info;
72
73
      /* transit pointer passed to the routine fault_hook */
73
 
      int (*fault_hook)(void *info, const char *msg);
 
74
      int (*fault_hook)(void *info, char *msg);
74
75
      /* user-defined fault hook routine */
75
76
      /*--------------------------------------------------------------*/
76
77
      /* dynamic memory registration */
93
94
      void *file_slot[LIB_MAX_OPEN]; /* FILE *file_slot[]; */
94
95
      /* file_slot[k], 0 <= k <= LIB_MAX_OPEN-1, is a pointer to k-th
95
96
         i/o stream; if k-th slot is free, file_slot[k] is NULL */
96
 
      /*--------------------------------------------------------------*/
97
 
      /* pseudo-random number generator */
98
 
      int rand_val[56];
99
 
      /* pseudo-random values */
100
 
      int *next_val;
101
 
      /* the next pseudo-random value to be exported */
 
97
#if 1 /* 14/I-2006 */
 
98
      void *hcpy_file; /* FILE *hcpy_file; */
 
99
      /* pointer to output stream used for hardcopying messages output
 
100
         on the screen by the print and fault routines; NULL means the
 
101
         hardcopy file is not used */
 
102
#endif
102
103
};
103
104
 
104
105
struct LIBMEM
136
137
int lib_free_env(void);
137
138
/* free library environment */
138
139
 
 
140
int lib_open_hardcopy(char *filename);
 
141
/* open hardcopy file */
 
142
 
 
143
int lib_close_hardcopy(void);
 
144
/* close hardcopy file */
 
145
 
139
146
void print(const char *fmt, ...);
140
147
/* print informative message */
141
148
 
194
201
char *strtrim(char *str);
195
202
/* remove trailing spaces from character string */
196
203
 
197
 
void lib_init_rand(int seed);
198
 
/* initialize pseudo-random number generator */
199
 
 
200
 
int lib_next_rand(void);
201
 
/* obtain pseudo-random integer on [0, 2^31-1] */
202
 
 
203
 
int lib_unif_rand(int m);
204
 
/* obtain pseudo-random integer on [0, m-1] */
 
204
int fp2rat(gnm_float x, gnm_float eps, gnm_float *p, gnm_float *q);
 
205
/* convert floating-point number to rational number */
 
206
 
 
207
int write_bmp16(char *fname, int m, int n, char map[]);
 
208
/* write 16-color raster image in Windows Bitmap format */
205
209
 
206
210
#endif
207
211