Clingo C API
C API for clingo providing high level functions to control grounding and solving.
|
Iterative enumeration of models (without using callbacks).
Clingo provides two additional ways to handle solving: Iterative Solving and Asynchronous Solving. With iterative solving, models are enumerated one by one by calling clingo_solve_iteratively_next() and clingo_solve_iteratively_get() in a loop.
For an example, see solve-iteratively.c.
Typedefs | |
typedef struct clingo_solve_iteratively | clingo_solve_iteratively_t |
Search handle to enumerate models iteratively. More... | |
Functions | |
bool | clingo_solve_iteratively_next (clingo_solve_iteratively_t *handle, clingo_model_t **model) |
Get the next model. More... | |
bool | clingo_solve_iteratively_get (clingo_solve_iteratively_t *handle, clingo_solve_result_bitset_t *result) |
Get the solve result. More... | |
bool | clingo_solve_iteratively_close (clingo_solve_iteratively_t *handle) |
Closes an active search. More... | |
typedef struct clingo_solve_iteratively clingo_solve_iteratively_t |
Search handle to enumerate models iteratively.
bool clingo_solve_iteratively_close | ( | clingo_solve_iteratively_t * | handle | ) |
Closes an active search.
There must be no function calls on the associated control object until this function has been called.
[in] | handle | the target |
bool clingo_solve_iteratively_get | ( | clingo_solve_iteratively_t * | handle, |
clingo_solve_result_bitset_t * | result | ||
) |
Get the solve result.
[in] | handle | the target |
[out] | result | the solve result |
bool clingo_solve_iteratively_next | ( | clingo_solve_iteratively_t * | handle, |
clingo_model_t ** | model | ||
) |
Get the next model.
[in] | handle | the target |
[out] | model | the next model |