public final class GlpkCallback extends Object
The GLPK MIP solver calls method callback
in
the branch-and-cut algorithm. A listener to the callback can be used to
influence the sequence in which nodes of the search tree are evaluated, or
to supply a heuristic solution. To find out why the callback is issued
use method GLPK.glp_ios_reason
.
The list of listeners is thread local. Each thread has to register its own listener.
Modifier and Type | Method and Description |
---|---|
static void |
addListener(GlpkCallbackListener listener)
Adds a listener for callbacks.
|
static void |
callback(long cPtr)
Callback method called by native library.
|
static boolean |
removeListener(GlpkCallbackListener listener)
Removes first occurance of a listener for callbacks.
|
public static void callback(long cPtr)
cPtr
- pointer to search treepublic static void addListener(GlpkCallbackListener listener)
listener
- listener for callbackspublic static boolean removeListener(GlpkCallbackListener listener)
listener
- listener for callbacksThis documentation is part of project GLPK for Java.
Group-ID | org.gnu.glpk |
Artifact-ID | glpk-java |
Version | 1.12.0 |