dReal4
contractor_integer.h
1 #pragma once
2 
3 #include <vector>
4 
5 #include "dreal/contractor/contractor_cell.h"
6 #include "dreal/util/box.h"
7 
8 namespace dreal {
9 
10 // Contractor for integer variables. For an integer variable `i = [lb,
11 // ub]`, it reduces the assignment into `[ceil(lb), floor(ub)]`.
12 //
13 // This class should be created via `make_contractor_integer` which
14 // handles the case where there is no integer/binary variables in a
15 // box.
17  public:
18  ContractorInteger(const Box& box, const Config& config);
19 
20  /// Deleted copy constructor.
21  ContractorInteger(const ContractorInteger&) = delete;
22 
23  /// Deleted move constructor.
25 
26  /// Deleted copy assign operator.
28 
29  /// Deleted move assign operator.
31 
32  /// Default destructor.
33  ~ContractorInteger() override = default;
34 
35  void Prune(ContractorStatus* contractor_status) const override;
36  std::ostream& display(std::ostream& os) const override;
37 
38  private:
39  std::vector<int> int_indexes_;
40 };
41 } // namespace dreal
const Config & config() const
Returns config.
Definition: contractor_cell.cc:33
std::ostream & display(std::ostream &os) const override
Outputs this contractor to os.
Definition: contractor_integer.cc:51
Abstract base class of contractors.
Definition: contractor_cell.h:29
Sum type of symbolic::Expression and symbolic::Formula.
Definition: api.cc:9
~ContractorInteger() override=default
Default destructor.
ContractorInteger & operator=(const ContractorInteger &)=delete
Deleted copy assign operator.
Definition: contractor_integer.h:16
Represents a n-dimensional interval vector.
Definition: box.h:17
Definition: config.h:12
void Prune(ContractorStatus *contractor_status) const override
Performs pruning on cs.
Definition: contractor_integer.cc:27
Contractor status.
Definition: contractor_status.h:13