Google OR-Tools v9.15
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
element.cc File Reference
#include <algorithm>
#include <cstdint>
#include <functional>
#include <limits>
#include <memory>
#include <numeric>
#include <string>
#include <utility>
#include <vector>
#include "absl/strings/str_format.h"
#include "absl/strings/str_join.h"
#include "ortools/base/logging.h"
#include "ortools/base/types.h"
#include "ortools/constraint_solver/constraint_solver.h"
#include "ortools/constraint_solver/constraint_solveri.h"
#include "ortools/util/range_minimum_query.h"
#include "ortools/util/string_array.h"

Go to the source code of this file.

Classes

class  operations_research::IfThenElseCt

Namespaces

namespace  operations_research
 OR-Tools root namespace.

Macros

#define UPDATE_RMQ_BASE_ELEMENT_INDEX_BOUNDS(test)
#define UPDATE_ELEMENT_INDEX_BOUNDS(test)

Functions

 ABSL_FLAG (bool, cp_disable_element_cache, true, "If true, caching for IntElement is disabled.")
void operations_research::LinkVarExpr (Solver *s, IntExpr *expr, IntVar *var)

Macro Definition Documentation

◆ UPDATE_ELEMENT_INDEX_BOUNDS

#define UPDATE_ELEMENT_INDEX_BOUNDS ( test)

Definition at line 986 of file element.cc.

◆ UPDATE_RMQ_BASE_ELEMENT_INDEX_BOUNDS

#define UPDATE_RMQ_BASE_ELEMENT_INDEX_BOUNDS ( test)
Value:
const std::vector<int64_t>& values = min_rmq_.array(); \
int64_t index_min = IndexMin(); \
int64_t index_max = IndexMax(); \
int64_t value = values[index_min]; \
while (index_min < index_max && (test)) { \
index_min++; \
value = values[index_min]; \
} \
if (index_min == index_max && (test)) { \
solver()->Fail(); \
} \
value = values[index_max]; \
while (index_max >= index_min && (test)) { \
index_max--; \
value = values[index_max]; \
} \
index_->SetRange(index_min, index_max);

Definition at line 424 of file element.cc.

Function Documentation

◆ ABSL_FLAG()

ABSL_FLAG ( bool ,
cp_disable_element_cache ,
true ,
"If true,
caching for IntElement is disabled."  )