[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
python-glpk + Re: [Help-glpk] SWIG for Visual Studio 2008, C#, and GLPK
From: |
Joao Pedro Pedroso |
Subject: |
python-glpk + Re: [Help-glpk] SWIG for Visual Studio 2008, C#, and GLPK |
Date: |
Tue, 10 Feb 2009 14:01:48 +0300 |
Nigel,
> Firstly, intArray and doubleArray are just my names. If you want to
> include both it is only necassary to use different names for the
> class arrays.
I was tempted to say that they are just MY names, because I said first
;-) but then I realized that I just copied/pasted them from the swig
documentation. So the copyright is not mine. :-(
> Secondly array functions work with Python.
I could not figure out how... (*)
> Finally, to celebrate the long struggle to get these multiple defines removed
> and the start of the struggle to get 'in' and 'out' removed see:
> http://lists.gnu.org/archive/html/help-glpk/2007-06/msg00000.html
I am afraid I could not understand what you suggest.
Anyway, I guess that your reluctance on accepting the lines
%array_class(int, intArray);
%array_class(double, doubleArray);
comes from some incompatibility issues in Java, and decided to keep
python-glpk with a different swig interface for the time being.
The current version is 0.1.36, available at the usual place:
http://www.dcc.fc.up.pt/~jpp/code/python-glpk/
Enjoy,
Pedro
--
(*) I hope you did not mean use it as follows; did you?
a = new_doubleArray(10) # Create an array
for i in range(0,10):
doubleArray_setitem(a,i,2*i) # Set a value
print_array(a) # Pass to C
delete_doubleArray(a) # Destroy array
Current usage of C arrays in python-glpk is something like:
>>> a = intArray(10000000) # Array of 10-million integers
>>> for i in xrange(10000): # Set some values
... a[i] = i
>>> sumitems(a,10000) # call C function
49995000
>>>
> > ----- Original Message -----
> > From: xypron <address@hidden>
> > To: address@hidden
> > Subject: Re: [Help-glpk] SWIG for Visual Studio 2008, C#, and GLPK
> > Date: Thu, 5 Feb 2009 12:43:11 -0800 (PST)
> >
> >
> >
> > Hello Nigel,
> >
> > thank you for your contribution. It would make sense to integrate
> > instructions for creating c# libraries for GLPK with swig into the GLPK
> > distribution.
> >
> > Glpk is based on the GNU licence. Hence binaries can only be published if
> > the source is made available.
> >
> > For using glpk with C# you describe.
> > >> 5. Open Project -> Add Reference -> Browse, then select:
> > >> glpkSWIG.dll
> > >> and nigelzGLPK.dll.
> >
> > How can the dlls be created from source?
> >
> > Best regards
> >
> > Xypron
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- python-glpk + Re: [Help-glpk] SWIG for Visual Studio 2008, C#, and GLPK,
Joao Pedro Pedroso <=