File: abstract_combiner.h

package info (click to toggle)
mccs 1%3A1.1-5
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 708 kB
  • ctags: 948
  • sloc: ansic: 6,051; yacc: 652; makefile: 148; lex: 129; sh: 26
file content (37 lines) | stat: -rw-r--r-- 1,141 bytes parent folder | download | duplicates (8)
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