pyconstruct.domains.BaseDomain

class pyconstruct.domains.BaseDomain(cache=None, n_jobs=1)

The structured objects domain.

The domain contain the description of the objects and provides oracles for computing inference problems.

This is the basic class from which domains should inherit. In most cases, when working with MiniZinc domains, it should not be necessary to create a custom domain, but it is always possible to create a new Domain class for e.g. using an ad-hoc inference algorithm to make predictions more efficient.

In the future we might introduce additional domains and inference methods.

Parameters:
  • cache (dict-like) – A dict-like cache like those from the cachetools library.
  • n_jobs (int) – The number of inference problems to solve in parallel.

Methods

infer(*args, **kwargs) Inference oracle.
n_features(**kwargs) Return the number of features in the feature vector.