2 using System.Collections.Generic;
5 namespace org.gnu.glpk {
23 private static ThreadLocal<LinkedList<IGlpkCallbackListener>> listeners
24 =
new ThreadLocal<LinkedList<IGlpkCallbackListener>> (() =>
26 return new LinkedList<IGlpkCallbackListener>();
52 listeners.Value.AddLast(listener);
61 if (listeners.Value.Contains(listener)) {
62 listeners.Value.Remove(listener);
static void addListener(IGlpkCallbackListener listener)
Adds a listener for callbacks.
static bool removeListener(IGlpkCallbackListener listener)
Removes first occurance of a listener for callbacks.
static void callback(IntPtr cPtr)
Callback method called by native library.
This class manages callbacks from the MIP solver.
void callback(glp_tree tree)
Method call by the GLPK MIP solver in the branch-and-cut algorithm.