Model Problem
A model problem is a subclass of AbstractProblem
that defines the energy function of a computational problem. Facts affecting the computational complexity classification of the problem also include the topology of the problem and the domain of the variables.
Interfaces
Required functions include:
variables
: The degrees of freedoms in the problem. e.g. for the maximum independent set problems, they are the indices of vertices: 1, 2, 3..., while for the max cut problem, they are the edges.flavors
: A vector of integers as the flavors (or domain) of a degree of freedom. e.g. for the maximum independent set problems, the flavors are [0, 1], where 0 means the vertex is not in the set and 1 means the vertex is in the set.parameters
: Energies associated with terms.evaluate
: Evaluate the energy of a given configuration.
Optional functions include:
num_variables
: The number of variables in the problem.num_flavors
: The number of flavors in the problem.set_parameters
: Change the parameters for theproblem
and return a new problem instance.parameter_type
: The data type of parameters.findbest
: Find the best configurations in the computational problem.