The solve event handler interface.
More...
#include <solve.h>
|
bool(* | model )(clingo_model_t *model, void *data, bool *goon) |
| Call back to intercept models.
|
|
bool(* | unsat )(int64_t const *values, size_t size, void *data) |
| Callback to interept lower bounds.
|
|
bool(* | stats )(clingo_stats_t *stats, void *data) |
| Callback to extend statistics.
|
|
void(* | finish )(clingo_solve_result_bitset_t result, void *data) |
| Callback to notify that the search has finished.
|
|
void(* | free )(void *data) |
| Callback to free the userdata of the handler.
|
|
The solve event handler interface.
- Examples
- control.c.
◆ finish
Callback to notify that the search has finished.
This can be used for thread synchronization as the function is not called in the main thread when solving asynchronously.
- Parameters
-
result | the solve result |
data | the user data |
◆ free
void(* clingo_solve_event_handler::free) (void *data) |
Callback to free the userdata of the handler.
- Parameters
-
◆ model
bool(* clingo_solve_event_handler::model) (clingo_model_t *model, void *data, bool *goon) |
Call back to intercept models.
- Parameters
-
model | the model |
data | the user data |
goon | whether to stop or continue |
- Returns
- whether the call was successful
◆ stats
bool(* clingo_solve_event_handler::stats) (clingo_stats_t *stats, void *data) |
Callback to extend statistics.
- Parameters
-
stats | the stats object |
data | the user data |
- Returns
- whether the call was successful
◆ unsat
bool(* clingo_solve_event_handler::unsat) (int64_t const *values, size_t size, void *data) |
Callback to interept lower bounds.
- Parameters
-
values | the values of the current lower bound |
size | the number of values in the lower bound |
data | the user data |
- Returns
- whether the call was successful
The documentation for this struct was generated from the following file: