1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
|
/*******************************************************/
/* CUDF solver: abstract_combiner.h */
/* Abstract class for combiners */
/* (c) Claude Michel I3S (UNSA-CNRS) 2009,2010,2011 */
/*******************************************************/
#ifndef __ABSTRACT_COMBINER_H
#define __ABSTRACT_COMBINER_H
#include <cudf.h>
#include <abstract_criteria.h>
// An anstract combiner
class abstract_combiner {
public:
// Called to know the number of columns required by the combiner
virtual int column_allocation(int first_rank) { return first_rank; }
// Method in charge of the combiner objective generation
virtual int objective_generation() { return 0; }
// Method in charge of the combiner constraint generation
virtual int constraint_generation() { return 0; }
// Tells whether this combiner allows problem reductions or not
virtual bool can_reduce() { return true; }
// Called to let the combiner initializes itself
virtual void initialize(CUDFproblem *problem, abstract_solver *solver) { };
// Combiner destructor
virtual ~abstract_combiner() { };
};
#endif
|