/[ascend]/trunk/ascxx/solver.h
ViewVC logotype

Contents of /trunk/ascxx/solver.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2327 - (show annotations) (download) (as text)
Wed Dec 22 07:17:24 2010 UTC (13 years, 8 months ago) by jpye
File MIME type: text/x-chdr
File size: 997 byte(s)
Merging in refactor of the C++ code, which is moved out of 'pygtk' and into 'ascxx'.
Adding support for IPOPT 3.9.1, the current latest version.
Support in dtar for parallel builds (possibly needs some testing still).
1 #ifndef ASCXX_SOLVER_H
2 #define ASCXX_SOLVER_H
3
4 #include <string>
5 #include <vector>
6
7 #include "config.h"
8 extern "C"{
9 #include <ascend/general/platform.h>
10 #include <ascend/compiler/instance_enum.h>
11 #include <ascend/system/slv_client.h>
12 }
13
14 /**
15 This is a rather problematic wrapper for slv_client.h. It's hard because registerd solvers
16 are referenced primarily by index, not by pointer etc, so given the index, we always have
17 to look up the solver in some way or other.
18
19 Because the index is changeable from session to session, depending on the order of
20 registration, we'll use the *name* as the primary key and look up the index as needed.
21 */
22 class Solver{
23 private:
24 std::string name;
25 public:
26 Solver();
27 Solver(const Solver &);
28 Solver(const std::string &name);
29
30 const int getIndex() const;
31 const std::string& getName() const;
32 };
33
34 /**
35 Some global functions
36 */
37 void registerStandardSolvers();
38 //void registerSolver(SlvRegistration regfuncptr);
39 const std::vector<Solver> getSolvers();
40
41 #endif

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