/[ascend]/trunk/tcltk98/generic/interface/MtxProc.h
ViewVC logotype

Contents of /trunk/tcltk98/generic/interface/MtxProc.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 231 - (show annotations) (download) (as text)
Sun Jan 29 14:15:44 2006 UTC (16 years, 3 months ago) by johnpye
File MIME type: text/x-chdr
File size: 5485 byte(s)
Moved some incidence matrix routines to generic/solver from tcltk98.
Documentation changes.
Added (inactive) incidence matrix menu item to PyGTK interface
Fixed autotools make for above changed (need to fix for Jam as well)
1 /*
2 * Incidence matrix routines.
3 * by Kirk Abbott and Ben Allan
4 * Created: 1/94
5 * Version: $Revision: 1.6 $
6 * Date last modified: $Date: 2003/08/23 18:43:07 $
7 * Last modified by: $Author: ballan $
8 *
9 * This file is part of the ASCEND Tcl/Tk interface
10 *
11 * Copyright 1997, Carnegie Mellon University
12 *
13 * The ASCEND Tcl/Tk interface is free software; you can redistribute
14 * it and/or modify it under the terms of the GNU General Public License as
15 * published by the Free Software Foundation; either version 2 of the
16 * License, or (at your option) any later version.
17 *
18 * The ASCEND Tcl/Tk interface is distributed in hope that it will be
19 * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
21 * General Public License for more details.
22 *
23 * You should have received a copy of the GNU General Public License
24 * along with the program; if not, write to the Free Software Foundation,
25 * Inc., 675 Mass Ave, Cambridge, MA 02139 USA. Check the file named
26 * COPYING. COPYING is found in ../compiler.
27 */
28
29 /** @file
30 * Incidence matrix routines.
31 * <pre>
32 * To include this header, you must include the following:
33 * #include "tcl.h"
34 * #include "utilities/ascConfig.h"
35 * #include "interface/MtxProc.h"
36 * </pre>
37 */
38
39 #ifndef ASCTK_MTXPROC_H
40 #define ASCTK_MTXPROC_H
41
42 extern int Asc_MtxGUIPlotIncidence(ClientData cdata, Tcl_Interp *interp,
43 int argc, CONST84 char *argv[]);
44 /**<
45 * Plot the current incidence matrix based on the solver system following
46 * the parameters given.<br><br>
47 *
48 * Registered as:
49 * mtx_gui_plot_incidence <sf xoff yoff cname bmfg bmbg ra ca va ea>
50 * <pre>
51 * The inputs are:
52 * sf (1-14): (this range should perhaps be queried about first, but
53 * we are foregoing that nicety at the moment.)
54 * xoff, yoff: canvas plot offsets from 0,0
55 * cname: an existing(!) tk canvas name
56 * bmfg: bitmap foreground color
57 * bmbg: bitmap background color
58 * ra: name of canvas rowindex to relation number conversion array
59 * ca: name of canvas colindex to variable number conversion array
60 * The following note is not yet implemented.
61 * Note that in the case of slack variables, the "variable number"
62 * will be preceded by a "-" and the number is the number of the
63 * relation for which that var is the slack.
64 * Until it is implemented, all slacks have "variable number" -1.
65 * va: name of variable number to canvas colindex conversion array
66 * Inverts what ca does.
67 * ea: name of relation number to canvas rowindex conversion array
68 * Inverts what ra does.
69 *
70 * The outputs are:
71 * 0 if ok, an error message otherwise.
72 * side effects: the canvas gets plotted
73 * in array ra : the element "num" and a bunch of elements with numeric
74 * names are set. num is the number of elements set.
75 * $ra($i) is the relation index corresponding to the
76 * i'th row displayed on the canvas.
77 * in array ca : the element "num" and a bunch of elements with numeric
78 * names are set. num is the number of elements set.
79 * $ca($i) is the variable index corresponding to the
80 * i'th column displayed on the canvas. It is something
81 * odd (see above) if the variable is not on the varlist.
82 * in array ea : the element "num" and a bunch of elements with numeric
83 * names are set. num is the number of elements set.
84 * $ea(i) is the canvas row index corresponding to
85 * relation number i displayed on the canvas.
86 * in array va : the element "num" and a bunch of elements with numeric
87 * names are set. num is the number of elements set.
88 * $va(i) is the canvas colindex corresponding to
89 * variable number i displayed on the canvas.
90 * For the moment, slacks do not appear in va.
91 * scrollregion list {xul yul xlr ylr}
92 *
93 * On entry, the canvas must exist. The arrays will be created if they
94 * do not exist. ra, ca, va, ea should be the names of global tcl arrays.
95 * The caller is responsible for cleaning off the canvas and clearing
96 * the arrays before calling, if those actions are desired. We don't
97 * mind stomping all over them if they are already filled.
98 *
99 * Bugs: This is all one big bug because tcl is too slow.
100 * What the canvas looks like:
101 * The following formats should be input somehow rather than hardwired.
102 * asc_sq_: used for variable free and incident on included relations.
103 * asc_sq_h: used for variable free and incident on unincluded relations.
104 * asc_sq_x: used for variable fixed and incident on included relations.
105 * asc_sq_c: used for variable fixed and incident on unincluded relations.
106 * asc_lrt_: used for slack variable incident on included relation.
107 * asc_lrt_h: used for slack variable incident on unincluded relation.
108 *
109 * The incidence matrix will contain only active vars and active rels
110 * </pre>
111 */
112
113 extern int Asc_MtxHelpList(ClientData cdata, Tcl_Interp *interp,
114 int argc, CONST84 char *argv[]);
115 /**<
116 * mtxhelp command for tcl.
117 * no arg -> return tcl list.
118 * "s" -> list names only, "l" -> short explanations also, to stderr.<br><br>
119 *
120 * Registered as: mtxhelp [s,l]
121 */
122
123 #endif /* MtxProc_module_loaded */
124

john.pye@anu.edu.au
ViewVC Help
Powered by ViewVC 1.1.22