[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Help-glpk] Wrapping GLPK with SWIG using IAJAAR.
From: |
Nigel Galloway |
Subject: |
[Help-glpk] Wrapping GLPK with SWIG using IAJAAR. |
Date: |
Thu, 12 Feb 2009 19:56:04 +0300 |
The files described below can be found at:
www.geocities.com/nigel_galloway/IAJAAR.zip
1)iajaar.h is intended for use when wrapping GLPK with SWIG. A suggested
swig input file is something like:
%module nigelzGLPK
%{
#include "iajaar.h"
#include "glpk.h"
%}
%include "iajaar.h"
%include "glpk.h"
and then coding something like (in java):
iajaar p = new iajaar(10);
glp_prob lp = nigelzGLPK.glp_create_prob();
.
.
p.Add(2,3,5.0);
p.Add(3,3,6.0);
nigelzGLPK.glp_load_matrix(lp, p.Count(), p.ia(), p.ja(), p.ar());
.
.
p.delete()
Add will throw an exception if the allocated size of iajaar is exceeded.
2) NigelGLPK.i is a swig input file suitable for use with iajaar.h
3) Sample.java is the example from glpk.pdf written to demonstrate
using iajaar.h with SWIG to code it in Java.
4) t1.java is the example from glpk/examples/t1.cs written to demonstrate
using iajaar.h with SWIG to code it in Java.
You are of course welcome to include the two example in your examples directory.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Help-glpk] Wrapping GLPK with SWIG using IAJAAR.,
Nigel Galloway <=