solves the current problem using INCOP local search solver by Bertrand Neveu
virtual bool
solve_symmax2sat (int n, int m, int *posx, int *posy, double *cost, int *sol)=0
quadratic unconstrained pseudo-Boolean optimization Maximize where is expressed by all its non-zero half squared matrix costs (can be positive or negative, with )
read a solution from a string (see ToulBar2 option -x)
virtual const vector< Value >
getSolution ()=0
after solving the problem, return the optimal solution (warning! do not use it if doing solution counting or if there is no solution, see WeightedCSPSolver::solve output for that)
virtual Double
getSolutionValue () const =0
after solving the problem, return the optimal solution value (can be an arbitrary real cost in minimization or preference in maximization, see CFN format) (warning! do not use it if doing solution counting or if there is no solution, see WeightedCSPSolver::solve output for that)
virtual Cost
getSolutionCost () const =0
after solving the problem, return the optimal solution nonnegative integer cost (warning! do not use it if doing solution counting or if there is no solution, see WeightedCSPSolver::solve output for that)
after solving the problem, add the optimal solution in the input/output vector and returns its optimum cost (warning! do not use it if doing solution counting or if there is no solution, see WeightedCSPSolver::solve output for that)
virtual vector< pair< Double, vector< Value > > >
getSolutions () const =0
after solving the problem, return all solutions found with their corresponding value
after solving the problem, add the optimal solution in the input/output vector and returns its optimum cost (warning! do not use it if doing solution counting or if there is no solution, see WeightedCSPSolver::solve output for that)
quadratic unconstrained pseudo-Boolean optimization Maximize where is expressed by all its non-zero half squared matrix costs (can be positive or negative, with )
Note
costs for are multiplied by 2 by this method
by convention: and
Warning
does not allow infinite costs (no forbidden assignments, unconstrained optimization)
Returns
true if at least one solution has been found (array sol being filled with the best solution)