/[ascend]/trunk/base/generic/solver/incidence.h
ViewVC logotype

Contents of /trunk/base/generic/solver/incidence.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 490 - (show annotations) (download) (as text)
Tue Apr 18 06:55:20 2006 UTC (13 years, 7 months ago) by johnpye
File MIME type: text/x-chdr
File size: 2858 byte(s)
Moved 'extern "C"' into the ASC_DLLSPEC macro.
Renamed .no.yacc and .no.flex files to have .c extension, so that SCons can tell what they are.
Working on getting things building on VC++, still some problems (maybe just issues with $PATH tho)./
1 /* ASCEND Solver Interface
2 Copyright (C) 2006 Carnegie Mellon University
3
4 This program is free software; you can redistribute it and/or
5 modify it under the terms of the GNU General Public License
6 as published by the Free Software Foundation; either version 2
7 of the License, or (at your option) any later version.
8
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
13
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17 *//**
18 @file
19 This file wraps up the routines for making a data structure
20 containing system incidence matrix information, which can then be
21 plotted or interactively queried using the GUI
22 */
23
24 #ifndef ASC_INCIDENCE_H
25 #define ASC_INCIDENCE_H
26
27 #include <stdio.h>
28
29 /* The includes required just for this *header* to load */
30 #include <utilities/ascConfig.h>
31 #include <solver/slv_types.h>
32 #include <solver/var.h>
33 #include <solver/rel.h>
34
35 /* Note, removed 'own' attribute from mplotvars struct since it was unused */
36
37 typedef struct{
38 int nprow; /**< number of plotted rows (== neqn always for now) */
39 int neqn; /**< number of relations. orgrows 0-neqns are relations */
40 int npcol; /**< number of plotted columns (== nfakevar) */
41 int nvar; /**< number of variables. orgcols 0-nvars-1 are variables */
42 int nfakevar; /**< nvar -nnincident + nslack (currently always == npcol) */
43 int *pr2e; /**< len nprow, mapping plot row -> eqn id */
44 int *e2pr; /**< len neqn, mapping eqn id -> plot row */
45 int *pc2v; /**< len npcol, mapping plot column -> var org col */
46 int *v2pc; /**< len nvar, mapping var org col -> plot col */
47 char *vfixed; /**< len nvar, fixed flags by var org col */
48
49 struct var_variable **vlist; /** pointer to the array of variables in the system */
50 struct rel_relation **rlist; /** pointer to the array of relations in the system */
51 } incidence_vars_t;
52
53 ASC_DLLSPEC(int) build_incidence_data(CONST slv_system_t sys, incidence_vars_t *pd);
54 /**<
55 Fill in an mplotvars struct
56
57 @return 0 if ok, 1 otherwise
58
59 This function is in charge of setting the layout that will appear
60 in the canvas (row and column ordering). right now it is doing
61 its own arrangement based on the mtx structure associated with
62 the solver. Eventually it would be much better if the solvers
63 provided the display orderings themselves.
64 Also this does a 1time query of all the var fixed flags.
65 */
66
67
68 ASC_DLLSPEC(void) free_incidence_data(incidence_vars_t *pd);
69 /**<
70 free memory in an mplotvars struct, if it is our memory
71 */
72 #endif /* ASC_INCIDENCE_H */

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