Category:Wren-linear: Difference between revisions

m
Now using internal links to related pages.
(Created page for 'Wren-linear' module.)
 
m (Now using internal links to related pages.)
 
Line 2:
'''Wren-linear''' is a module which wraps most of the [https://www.gnu.org/software/glpk/ GNU Linear Programming Kit ('GLPK')] for use by Wren programmers. It consists of seven classes: Glp, Prob, Smcp, Iptcp, Iocp, Tran and File. Of these Prob is the most important enabling LP/MIP problems to be solved using various methods whilst Tran provides a translator for GNU MathProg scripts. The other classes provide relevant constants, parameters or utility methods.
It is the thirty-fifth in a series of modules (listed on the language's [https[://rosettacode.org/wiki/Category:Wren |main page]]) designed to assist with writing Rosetta Code tasks so the same code does not have to be written or copy/pasted time and time again thereby bloating a task's script code unnecessarily.
 
To use it you need to copy the Wren source code (in the [https[://rosettacode.org/wiki/Category_talk:Wren-linear |talk page]]) to a text file called ''linear.wren'' and place this in the same directory as the importing script so the Wren-linear executable can find it.
 
Currently, Wren-cli does not support plug-ins though this or similar functionality is likely to be added in a future version (it's already present in [https[://rosettacode.org/wiki/Category:DOME |DOME]]). Consequently, scripts using the Wren-linear module must be run under the control of a special executable whose source code (wren-linear.c) is also included (in the [https[://rosettacode.org/wiki/Category_talk:Wren-linear |talk page]]). This executable translates Wren method calls to calls to the corresponding GLPK functions and can be built with a command line such as the following using GCC under Linux:
 
$ gcc -O3 wren-linear.c -o wren-linear -lglpk -lwren -lm
9,485

edits