GNU Octave  4.4.1
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
__glpk__.cc
Go to the documentation of this file.
1 /*
2 
3 Copyright (C) 2005-2018 Nicolo' Giorgetti
4 Copyright (C) 2013-2018 Sébastien Villemot <sebastien@debian.org>
5 
6 This file is part of Octave.
7 
8 Octave is free software: you can redistribute it and/or modify it
9 under the terms of the GNU General Public License as published by
10 the Free Software Foundation, either version 3 of the License, or
11 (at your option) any later version.
12 
13 Octave is distributed in the hope that it will be useful, but
14 WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
17 
18 You should have received a copy of the GNU General Public License
19 along with Octave; see the file COPYING. If not, see
20 <https://www.gnu.org/licenses/>.
21 
22 */
23 
24 #if defined (HAVE_CONFIG_H)
25 # include "config.h"
26 #endif
27 
28 #include <ctime>
29 
30 #include <limits>
31 
32 #include "Array.h"
33 #include "chMatrix.h"
34 #include "dColVector.h"
35 #include "dMatrix.h"
36 #include "dSparse.h"
37 #include "lo-ieee.h"
38 
39 #include "defun-dld.h"
40 #include "error.h"
41 #include "errwarn.h"
42 #include "oct-map.h"
43 #include "ov.h"
44 #include "ovl.h"
45 
46 #if defined (HAVE_GLPK)
47 
48 extern "C"
49 {
50 #if defined (HAVE_GLPK_GLPK_H)
51 # include <glpk/glpk.h>
52 #else
53 # include <glpk.h>
54 #endif
55 }
56 
58 {
59  int msglev;
60  int dual;
61  int price;
62  int itlim;
63  int outfrq;
64  int branch;
65  int btrack;
66  int presol;
67  int rtest;
68  int tmlim;
69  int outdly;
70  double tolbnd;
71  double toldj;
72  double tolpiv;
73  double objll;
74  double objul;
75  double tolint;
76  double tolobj;
77 };
78 
79 int
80 glpk (int sense, int n, int m, double *c, int nz, int *rn, int *cn,
81  double *a, double *b, char *ctype, int *freeLB, double *lb,
82  int *freeUB, double *ub, int *vartype, int isMIP, int lpsolver,
83  int save_pb, int scale, const control_params *par,
84  double *xmin, double *fmin, int *status,
85  double *lambda, double *redcosts, double *time)
86 {
87  int typx = 0;
88  int errnum = 0;
89 
90  clock_t t_start = clock ();
91 
92  glp_prob *lp = glp_create_prob ();
93 
94  // Set the sense of optimization
95  if (sense == 1)
96  glp_set_obj_dir (lp, GLP_MIN);
97  else
98  glp_set_obj_dir (lp, GLP_MAX);
99 
100  glp_add_cols (lp, n);
101  for (int i = 0; i < n; i++)
102  {
103  // Define type of the structural variables
104  if (! freeLB[i] && ! freeUB[i])
105  {
106  if (lb[i] != ub[i])
107  glp_set_col_bnds (lp, i+1, GLP_DB, lb[i], ub[i]);
108  else
109  glp_set_col_bnds (lp, i+1, GLP_FX, lb[i], ub[i]);
110  }
111  else
112  {
113  if (! freeLB[i] && freeUB[i])
114  glp_set_col_bnds (lp, i+1, GLP_LO, lb[i], ub[i]);
115  else
116  {
117  if (freeLB[i] && ! freeUB[i])
118  glp_set_col_bnds (lp, i+1, GLP_UP, lb[i], ub[i]);
119  else
120  glp_set_col_bnds (lp, i+1, GLP_FR, lb[i], ub[i]);
121  }
122  }
123 
124  // -- Set the objective coefficient of the corresponding
125  // -- structural variable. No constant term is assumed.
126  glp_set_obj_coef(lp,i+1,c[i]);
127 
128  if (isMIP)
129  glp_set_col_kind (lp, i+1, vartype[i]);
130  }
131 
132  glp_add_rows (lp, m);
133 
134  for (int i = 0; i < m; i++)
135  {
136  // If the i-th row has no lower bound (types F,U), the
137  // corrispondent parameter will be ignored. If the i-th row has
138  // no upper bound (types F,L), the corrispondent parameter will be
139  // ignored. If the i-th row is of S type, the i-th LB is used,
140  // but the i-th UB is ignored.
141 
142  switch (ctype[i])
143  {
144  case 'F':
145  typx = GLP_FR;
146  break;
147 
148  case 'U':
149  typx = GLP_UP;
150  break;
151 
152  case 'L':
153  typx = GLP_LO;
154  break;
155 
156  case 'S':
157  typx = GLP_FX;
158  break;
159 
160  case 'D':
161  typx = GLP_DB;
162  break;
163  }
164 
165  glp_set_row_bnds (lp, i+1, typx, b[i], b[i]);
166 
167  }
168 
169  glp_load_matrix (lp, nz, rn, cn, a);
170 
171  if (save_pb)
172  {
173  static char tmp[] = "outpb.lp";
174  if (glp_write_lp (lp, nullptr, tmp) != 0)
175  error ("__glpk__: unable to write problem");
176  }
177 
178  // scale the problem data
179  if (! par->presol || lpsolver != 1)
180  glp_scale_prob (lp, scale);
181 
182  // build advanced initial basis (if required)
183  if (lpsolver == 1 && ! par->presol)
184  glp_adv_basis (lp, 0);
185 
186  // For MIP problems without a presolver, a first pass with glp_simplex
187  // is required
188  if ((! isMIP && lpsolver == 1)
189  || (isMIP && ! par->presol))
190  {
191  glp_smcp smcp;
192  glp_init_smcp (&smcp);
193  smcp.msg_lev = par->msglev;
194  smcp.meth = par->dual;
195  smcp.pricing = par->price;
196  smcp.r_test = par->rtest;
197  smcp.tol_bnd = par->tolbnd;
198  smcp.tol_dj = par->toldj;
199  smcp.tol_piv = par->tolpiv;
200  smcp.obj_ll = par->objll;
201  smcp.obj_ul = par->objul;
202  smcp.it_lim = par->itlim;
203  smcp.tm_lim = par->tmlim;
204  smcp.out_frq = par->outfrq;
205  smcp.out_dly = par->outdly;
206  smcp.presolve = par->presol;
207  errnum = glp_simplex (lp, &smcp);
208  }
209 
210  if (isMIP)
211  {
212  glp_iocp iocp;
213  glp_init_iocp (&iocp);
214  iocp.msg_lev = par->msglev;
215  iocp.br_tech = par->branch;
216  iocp.bt_tech = par->btrack;
217  iocp.tol_int = par->tolint;
218  iocp.tol_obj = par->tolobj;
219  iocp.tm_lim = par->tmlim;
220  iocp.out_frq = par->outfrq;
221  iocp.out_dly = par->outdly;
222  iocp.presolve = par->presol;
223  errnum = glp_intopt (lp, &iocp);
224  }
225 
226  if (! isMIP && lpsolver == 2)
227  {
228  glp_iptcp iptcp;
229  glp_init_iptcp (&iptcp);
230  iptcp.msg_lev = par->msglev;
231  errnum = glp_interior (lp, &iptcp);
232  }
233 
234  if (errnum == 0)
235  {
236  if (isMIP)
237  {
238  *status = glp_mip_status (lp);
239  *fmin = glp_mip_obj_val (lp);
240  }
241  else
242  {
243  if (lpsolver == 1)
244  {
245  *status = glp_get_status (lp);
246  *fmin = glp_get_obj_val (lp);
247  }
248  else
249  {
250  *status = glp_ipt_status (lp);
251  *fmin = glp_ipt_obj_val (lp);
252  }
253  }
254 
255  if (isMIP)
256  {
257  for (int i = 0; i < n; i++)
258  xmin[i] = glp_mip_col_val (lp, i+1);
259  }
260  else
261  {
262  // Primal values
263  for (int i = 0; i < n; i++)
264  {
265  if (lpsolver == 1)
266  xmin[i] = glp_get_col_prim (lp, i+1);
267  else
268  xmin[i] = glp_ipt_col_prim (lp, i+1);
269  }
270 
271  // Dual values
272  for (int i = 0; i < m; i++)
273  {
274  if (lpsolver == 1)
275  lambda[i] = glp_get_row_dual (lp, i+1);
276  else
277  lambda[i] = glp_ipt_row_dual (lp, i+1);
278  }
279 
280  // Reduced costs
281  for (int i = 0; i < glp_get_num_cols (lp); i++)
282  {
283  if (lpsolver == 1)
284  redcosts[i] = glp_get_col_dual (lp, i+1);
285  else
286  redcosts[i] = glp_ipt_col_dual (lp, i+1);
287  }
288  }
289 
290  *time = (clock () - t_start) / CLOCKS_PER_SEC;
291  }
292 
293  glp_delete_prob (lp);
294  // Request that GLPK free all memory resources.
295  // This prevents reported memory leaks, but isn't strictly necessary.
296  // The memory blocks use are allocated once and don't grow with further
297  // calls to glpk so they would be reclaimed anyways when Octave exits.
298  glp_free_env ();
299 
300  return errnum;
301 }
302 
303 #endif
304 
305 #define OCTAVE_GLPK_GET_REAL_PARAM(NAME, VAL) \
306  do \
307  { \
308  octave_value tmp = PARAM.getfield (NAME); \
309  \
310  if (tmp.is_defined ()) \
311  { \
312  if (! tmp.isempty ()) \
313  VAL = tmp.xscalar_value ("glpk: invalid value in PARAM" NAME); \
314  else \
315  error ("glpk: invalid value in PARAM" NAME); \
316  } \
317  } \
318  while (0)
319 
320 #define OCTAVE_GLPK_GET_INT_PARAM(NAME, VAL) \
321  do \
322  { \
323  octave_value tmp = PARAM.getfield (NAME); \
324  \
325  if (tmp.is_defined ()) \
326  { \
327  if (! tmp.isempty ()) \
328  VAL = tmp.xint_value ("glpk: invalid value in PARAM" NAME); \
329  else \
330  error ("glpk: invalid value in PARAM" NAME); \
331  } \
332  } \
333  while (0)
334 
335 DEFUN_DLD (__glpk__, args, ,
336  doc: /* -*- texinfo -*-
337 @deftypefn {} {[@var{values}] =} __glpk__ (@var{args})
338 Undocumented internal function.
339 @end deftypefn */)
340 {
341 #if defined (HAVE_GLPK)
342 
343  // FIXME: Should we even need checking for an internal function?
344  if (args.length () != 9)
345  print_usage ();
346 
347  // 1nd Input. A column array containing the objective function coefficients.
348  int mrowsc = args(0).rows ();
349 
350  Matrix C = args(0).xmatrix_value ("__glpk__: invalid value of C");
351 
352  double *c = C.fortran_vec ();
353  Array<int> rn;
354  Array<int> cn;
355  ColumnVector a;
356  int mrowsA;
357  int nz = 0;
358 
359  // 2nd Input. A matrix containing the constraints coefficients.
360  // If matrix A is NOT a sparse matrix
361  if (args(1).issparse ())
362  {
363  SparseMatrix A = args(1).xsparse_matrix_value ("__glpk__: invalid value of A");
364 
365  mrowsA = A.rows ();
366  octave_idx_type Anc = A.cols ();
367  octave_idx_type Anz = A.nnz ();
368  rn.resize (dim_vector (Anz+1, 1));
369  cn.resize (dim_vector (Anz+1, 1));
370  a.resize (Anz+1, 0.0);
371 
372  if (Anc != mrowsc)
373  error ("__glpk__: invalid value of A");
374 
375  for (octave_idx_type j = 0; j < Anc; j++)
376  for (octave_idx_type i = A.cidx (j); i < A.cidx (j+1); i++)
377  {
378  nz++;
379  rn(nz) = A.ridx (i) + 1;
380  cn(nz) = j + 1;
381  a(nz) = A.data(i);
382  }
383  }
384  else
385  {
386  Matrix A = args(1).xmatrix_value ("__glpk__: invalid value of A");
387 
388  mrowsA = A.rows ();
389  rn.resize (dim_vector (mrowsA*mrowsc+1, 1));
390  cn.resize (dim_vector (mrowsA*mrowsc+1, 1));
391  a.resize (mrowsA*mrowsc+1, 0.0);
392 
393  for (int i = 0; i < mrowsA; i++)
394  {
395  for (int j = 0; j < mrowsc; j++)
396  {
397  if (A(i,j) != 0)
398  {
399  nz++;
400  rn(nz) = i + 1;
401  cn(nz) = j + 1;
402  a(nz) = A(i,j);
403  }
404  }
405  }
406 
407  }
408 
409  // 3rd Input. A column array containing the right-hand side value
410  // for each constraint in the constraint matrix.
411  Matrix B = args(2).xmatrix_value ("__glpk__: invalid value of B");
412 
413  double *b = B.fortran_vec ();
414 
415  // 4th Input. An array of length mrowsc containing the lower
416  // bound on each of the variables.
417  Matrix LB = args(3).xmatrix_value ("__glpk__: invalid value of LB");
418 
419  if (LB.numel () < mrowsc)
420  error ("__glpk__: invalid dimensions for LB");
421 
422  double *lb = LB.fortran_vec ();
423 
424  // LB argument, default: Free
425  Array<int> freeLB (dim_vector (mrowsc, 1));
426  for (int i = 0; i < mrowsc; i++)
427  {
428  if (octave::math::isinf (lb[i]))
429  {
430  freeLB(i) = 1;
432  }
433  else
434  freeLB(i) = 0;
435  }
436 
437  // 5th Input. An array of at least length numcols containing the upper
438  // bound on each of the variables.
439  Matrix UB = args(4).xmatrix_value ("__glpk__: invalid value of UB");
440 
441  if (UB.numel () < mrowsc)
442  error ("__glpk__: invalid dimensions for UB");
443 
444  double *ub = UB.fortran_vec ();
445 
446  Array<int> freeUB (dim_vector (mrowsc, 1));
447  for (int i = 0; i < mrowsc; i++)
448  {
449  if (octave::math::isinf (ub[i]))
450  {
451  freeUB(i) = 1;
453  }
454  else
455  freeUB(i) = 0;
456  }
457 
458  // 6th Input. A column array containing the sense of each constraint
459  // in the constraint matrix.
460  charMatrix CTYPE = args(5).xchar_matrix_value ("__glpk__: invalid value of CTYPE");
461 
462  char *ctype = CTYPE.fortran_vec ();
463 
464  // 7th Input. A column array containing the types of the variables.
465  charMatrix VTYPE = args(6).xchar_matrix_value ("__glpk__: invalid value of VARTYPE");
466 
467  Array<int> vartype (dim_vector (mrowsc, 1));
468  int isMIP = 0;
469  for (int i = 0; i < mrowsc ; i++)
470  {
471  if (VTYPE(i,0) == 'I')
472  {
473  isMIP = 1;
474  vartype(i) = GLP_IV;
475  }
476  else
477  vartype(i) = GLP_CV;
478  }
479 
480  // 8th Input. Sense of optimization.
481  int sense;
482  double SENSE = args(7).xscalar_value ("__glpk__: invalid value of SENSE");
483 
484  if (SENSE >= 0)
485  sense = 1;
486  else
487  sense = -1;
488 
489  // 9th Input. A structure containing the control parameters.
490  octave_scalar_map PARAM = args(8).xscalar_map_value ("__glpk__: invalid value of PARAM");
491 
492  control_params par;
493 
494  // Integer parameters
495 
496  // Level of messages output by the solver
497  par.msglev = 1;
498  OCTAVE_GLPK_GET_INT_PARAM ("msglev", par.msglev);
499  if (par.msglev < 0 || par.msglev > 3)
500  error ("__glpk__: PARAM.msglev must be 0 (no output) or 1 (error and warning messages only [default]) or 2 (normal output) or 3 (full output)");
501 
502  // scaling option
503  int scale = 16;
504  OCTAVE_GLPK_GET_INT_PARAM ("scale", scale);
505  if (scale < 0 || scale > 128)
506  error ("__glpk__: PARAM.scale must either be 128 (automatic selection of scaling options), or a bitwise or of: 1 (geometric mean scaling), 16 (equilibration scaling), 32 (round scale factors to power of two), 64 (skip if problem is well scaled");
507 
508  // Dual simplex option
509  par.dual = 1;
510  OCTAVE_GLPK_GET_INT_PARAM ("dual", par.dual);
511  if (par.dual < 1 || par.dual > 3)
512  error ("__glpk__: PARAM.dual must be 1 (use two-phase primal simplex [default]) or 2 (use two-phase dual simplex) or 3 (use two-phase dual simplex, and if it fails, switch to the primal simplex)");
513 
514  // Pricing option
515  par.price = 34;
516  OCTAVE_GLPK_GET_INT_PARAM ("price", par.price);
517  if (par.price != 17 && par.price != 34)
518  error ("__glpk__: PARAM.price must be 17 (textbook pricing) or 34 (steepest edge pricing [default])");
519 
520  // Simplex iterations limit
522  OCTAVE_GLPK_GET_INT_PARAM ("itlim", par.itlim);
523 
524  // Output frequency, in iterations
525  par.outfrq = 200;
526  OCTAVE_GLPK_GET_INT_PARAM ("outfrq", par.outfrq);
527 
528  // Branching heuristic option
529  par.branch = 4;
530  OCTAVE_GLPK_GET_INT_PARAM ("branch", par.branch);
531  if (par.branch < 1 || par.branch > 5)
532  error ("__glpk__: PARAM.branch must be 1 (first fractional variable) or 2 (last fractional variable) or 3 (most fractional variable) or 4 (heuristic by Driebeck and Tomlin [default]) or 5 (hybrid pseudocost heuristic)");
533 
534  // Backtracking heuristic option
535  par.btrack = 4;
536  OCTAVE_GLPK_GET_INT_PARAM ("btrack", par.btrack);
537  if (par.btrack < 1 || par.btrack > 4)
538  error ("__glpk__: PARAM.btrack must be 1 (depth first search) or 2 (breadth first search) or 3 (best local bound) or 4 (best projection heuristic [default]");
539 
540  // Presolver option
541  par.presol = 1;
542  OCTAVE_GLPK_GET_INT_PARAM ("presol", par.presol);
543  if (par.presol < 0 || par.presol > 1)
544  error ("__glpk__: PARAM.presol must be 0 (do NOT use LP presolver) or 1 (use LP presolver [default])");
545 
546  // LPsolver option
547  int lpsolver = 1;
548  OCTAVE_GLPK_GET_INT_PARAM ("lpsolver", lpsolver);
549  if (lpsolver < 1 || lpsolver > 2)
550  error ("__glpk__: PARAM.lpsolver must be 1 (simplex method) or 2 (interior point method)");
551 
552  // Ratio test option
553  par.rtest = 34;
554  OCTAVE_GLPK_GET_INT_PARAM ("rtest", par.rtest);
555  if (par.rtest != 17 && par.rtest != 34)
556  error ("__glpk__: PARAM.rtest must be 17 (standard ratio test) or 34 (Harris' two-pass ratio test [default])");
557 
559  OCTAVE_GLPK_GET_INT_PARAM ("tmlim", par.tmlim);
560 
561  par.outdly = 0;
562  OCTAVE_GLPK_GET_INT_PARAM ("outdly", par.outdly);
563 
564  // Save option
565  int save_pb = 0;
566  OCTAVE_GLPK_GET_INT_PARAM ("save", save_pb);
567  save_pb = save_pb != 0;
568 
569  // Real parameters
570 
571  // Relative tolerance used to check if the current basic solution
572  // is primal feasible
573  par.tolbnd = 1e-7;
574  OCTAVE_GLPK_GET_REAL_PARAM ("tolbnd", par.tolbnd);
575 
576  // Absolute tolerance used to check if the current basic solution
577  // is dual feasible
578  par.toldj = 1e-7;
579  OCTAVE_GLPK_GET_REAL_PARAM ("toldj", par.toldj);
580 
581  // Relative tolerance used to choose eligible pivotal elements of
582  // the simplex table in the ratio test
583  par.tolpiv = 1e-10;
584  OCTAVE_GLPK_GET_REAL_PARAM ("tolpiv", par.tolpiv);
585 
587  OCTAVE_GLPK_GET_REAL_PARAM ("objll", par.objll);
588 
590  OCTAVE_GLPK_GET_REAL_PARAM ("objul", par.objul);
591 
592  par.tolint = 1e-5;
593  OCTAVE_GLPK_GET_REAL_PARAM ("tolint", par.tolint);
594 
595  par.tolobj = 1e-7;
596  OCTAVE_GLPK_GET_REAL_PARAM ("tolobj", par.tolobj);
597 
598  // Assign pointers to the output parameters
599  ColumnVector xmin (mrowsc, octave_NA);
600  double fmin = octave_NA;
601  ColumnVector lambda (mrowsA, octave_NA);
602  ColumnVector redcosts (mrowsc, octave_NA);
603  double time;
604  int status;
605 
606  int errnum = glpk (sense, mrowsc, mrowsA, c, nz, rn.fortran_vec (),
607  cn.fortran_vec (), a.fortran_vec (), b, ctype,
608  freeLB.fortran_vec (), lb, freeUB.fortran_vec (),
609  ub, vartype.fortran_vec (), isMIP, lpsolver,
610  save_pb, scale, &par, xmin.fortran_vec (), &fmin,
611  &status, lambda.fortran_vec (),
612  redcosts.fortran_vec (), &time);
613 
614  octave_scalar_map extra;
615 
616  if (! isMIP)
617  {
618  extra.assign ("lambda", lambda);
619  extra.assign ("redcosts", redcosts);
620  }
621 
622  extra.assign ("time", time);
623  extra.assign ("status", status);
624 
625  return ovl (xmin, fmin, errnum, extra);
626 
627 #else
628 
629  octave_unused_parameter (args);
630 
631  err_disabled_feature ("glpk", "GNU Linear Programming Kit");
632 
633 #endif
634 }
635 
636 /*
637 ## No test needed for internal helper function.
638 %!assert (1)
639 */
double objll
Definition: __glpk__.cc:73
double objul
Definition: __glpk__.cc:74
F77_RET_T const F77_INT F77_CMPLX const F77_INT F77_CMPLX * B
#define C(a, b)
Definition: Faddeeva.cc:246
OCTINTERP_API void print_usage(void)
Definition: defun.cc:54
const T * fortran_vec(void) const
Definition: Array.h:584
int glpk(int sense, int n, int m, double *c, int nz, int *rn, int *cn, double *a, double *b, char *ctype, int *freeLB, double *lb, int *freeUB, double *ub, int *vartype, int isMIP, int lpsolver, int save_pb, int scale, const control_params *par, double *xmin, double *fmin, int *status, double *lambda, double *redcosts, double *time)
Definition: __glpk__.cc:80
void error(const char *fmt,...)
Definition: error.cc:578
bool isinf(double x)
Definition: lo-mappers.h:225
nd example oindent opens the file binary numeric values will be read assuming they are stored in IEEE format with the least significant bit and then converted to the native representation Opening a file that is already open simply opens it again and returns a separate file id It is not an error to open a file several though writing to the same file through several different file ids may produce unexpected results The possible values of text mode reading and writing automatically converts linefeeds to the appropriate line end character for the you may append a you must also open the file in binary mode The parameter conversions are currently only supported for and permissions will be set to and then everything is written in a single operation This is very efficient and improves performance c
Definition: file-io.cc:587
i e
Definition: data.cc:2591
calling an anonymous function involves an overhead quite comparable to the overhead of an m file function Passing a handle to a built in function is because the interpreter is not involved in the internal loop For a
Definition: cellfun.cc:400
F77_RET_T const F77_INT F77_CMPLX * A
#define OCTAVE_GLPK_GET_INT_PARAM(NAME, VAL)
Definition: __glpk__.cc:320
#define OCTAVE_GLPK_GET_REAL_PARAM(NAME, VAL)
Definition: __glpk__.cc:305
void resize(const dim_vector &dv, const T &rfv)
Resizing (with fill).
Definition: Array.cc:1010
double tmp
Definition: data.cc:6252
#define octave_NA
Definition: lo-ieee.h:38
Definition: dMatrix.h:36
double tolint
Definition: __glpk__.cc:75
octave_int< T > xmin(const octave_int< T > &x, const octave_int< T > &y)
charNDArray max(char d, const charNDArray &m)
Definition: chNDArray.cc:227
#define Inf
Definition: Faddeeva.cc:247
double tolbnd
Definition: __glpk__.cc:70
OCTAVE_EXPORT octave_value_list isa nd deftypefn *return ovl(args(0).isinteger())
void assign(const std::string &k, const octave_value &val)
Definition: oct-map.h:227
void scale(Matrix &m, double x, double y, double z)
Definition: graphics.cc:5442
b
Definition: cellfun.cc:400
double tolobj
Definition: __glpk__.cc:76
for i
Definition: data.cc:5264
double toldj
Definition: __glpk__.cc:71
#define DEFUN_DLD(name, args_name, nargout_name, doc)
Macro to define an at run time dynamically loadable builtin function.
Definition: defun-dld.h:58
octave_idx_type numel(void) const
Number of elements in the array.
Definition: Array.h:366
Vector representing the dimensions (size) of an Array.
Definition: dim-vector.h:87
double tolpiv
Definition: __glpk__.cc:72
void err_disabled_feature(const std::string &fcn, const std::string &feature, const std::string &pkg)
Definition: errwarn.cc:50