GLPK/F-Sharp

From Wikibooks, open books for an open world
Jump to: navigation, search

The F# is a functional programming language is developed by the F# Software Foundation, Microsoft, et al.

GLPK for C#/CLI[edit]

GLPK for C#/CLI provides a common language interface (CLI) binding for GLPK. It is licensed under GPL V3. The coding is generated using SWIG.

GLPK for C#/CLI supports callback and terminal listeners. Errors occurring in the GLPK native library are thrown as exceptions. All functions of the GLPK API are available as methods of the GLPK object as shown in the example below:

open System
open org.gnu.glpk

[<EntryPoint>]
let main argv =
    printfn "GLPK %s" (GLPK.glp_version())
    0

References[edit]