Google OR-Tools v9.11
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
integer.h File Reference
#include <stdlib.h>
#include <algorithm>
#include <cstdint>
#include <deque>
#include <functional>
#include <limits>
#include <memory>
#include <ostream>
#include <string>
#include <utility>
#include <vector>
#include "absl/base/attributes.h"
#include "absl/container/btree_map.h"
#include "absl/container/flat_hash_map.h"
#include "absl/container/inlined_vector.h"
#include "absl/log/check.h"
#include "absl/strings/str_cat.h"
#include "absl/types/span.h"
#include "ortools/base/logging.h"
#include "ortools/base/strong_vector.h"
#include "ortools/sat/model.h"
#include "ortools/sat/sat_base.h"
#include "ortools/sat/sat_parameters.pb.h"
#include "ortools/sat/sat_solver.h"
#include "ortools/util/bitset.h"
#include "ortools/util/rev.h"
#include "ortools/util/saturated_arithmetic.h"
#include "ortools/util/sorted_interval_list.h"
#include "ortools/util/strong_integers.h"
#include "ortools/util/time_limit.h"

Go to the source code of this file.

Classes

class  operations_research::sat::QuickSmallDivision
 
struct  operations_research::sat::IntegerLiteral
 
struct  operations_research::sat::AffineExpression
 
struct  operations_research::sat::IntegerDomains
 
struct  operations_research::sat::DebugSolution
 
struct  operations_research::sat::ValueLiteralPair
 A value and a literal. More...
 
struct  operations_research::sat::ValueLiteralPair::CompareByLiteral
 
struct  operations_research::sat::ValueLiteralPair::CompareByValue
 
struct  operations_research::sat::LiteralValueValue
 
struct  operations_research::sat::DelayedRootLevelDeduction
 
class  operations_research::sat::IntegerEncoder
 
class  operations_research::sat::LazyReasonInterface
 
class  operations_research::sat::IntegerTrail
 
class  operations_research::sat::PropagatorInterface
 Base class for CP like propagators. More...
 
class  operations_research::sat::RevIntRepository
 
class  operations_research::sat::RevIntegerValueRepository
 
class  operations_research::sat::GenericLiteralWatcher
 

Namespaces

namespace  operations_research
 In SWIG mode, we don't want anything besides these top-level includes.
 
namespace  operations_research::sat
 

Typedefs

using operations_research::sat::InlinedIntegerLiteralVector = absl::InlinedVector<IntegerLiteral, 2>
 
using operations_research::sat::InlinedIntegerValueVector
 

Functions

 operations_research::sat::DEFINE_STRONG_INT64_TYPE (IntegerValue)
 
constexpr IntegerValue operations_research::sat::kMaxIntegerValue (std::numeric_limits< IntegerValue::ValueType >::max() - 1)
 
constexpr IntegerValue operations_research::sat::kMinIntegerValue (-kMaxIntegerValue.value())
 
double operations_research::sat::ToDouble (IntegerValue value)
 
template<class IntType >
IntType operations_research::sat::IntTypeAbs (IntType t)
 
IntegerValue operations_research::sat::CeilRatio (IntegerValue dividend, IntegerValue positive_divisor)
 
IntegerValue operations_research::sat::FloorRatio (IntegerValue dividend, IntegerValue positive_divisor)
 
IntegerValue operations_research::sat::CapProdI (IntegerValue a, IntegerValue b)
 Overflows and saturated arithmetic.
 
IntegerValue operations_research::sat::CapSubI (IntegerValue a, IntegerValue b)
 
IntegerValue operations_research::sat::CapAddI (IntegerValue a, IntegerValue b)
 
bool operations_research::sat::ProdOverflow (IntegerValue t, IntegerValue value)
 
bool operations_research::sat::AtMinOrMaxInt64I (IntegerValue t)
 
IntegerValue operations_research::sat::PositiveRemainder (IntegerValue dividend, IntegerValue positive_divisor)
 
bool operations_research::sat::AddTo (IntegerValue a, IntegerValue *result)
 
bool operations_research::sat::AddProductTo (IntegerValue a, IntegerValue b, IntegerValue *result)
 Computes result += a * b, and return false iff there is an overflow.
 
 operations_research::sat::DEFINE_STRONG_INDEX_TYPE (IntegerVariable)
 
const IntegerVariable operations_research::sat::kNoIntegerVariable (-1)
 
IntegerVariable operations_research::sat::NegationOf (IntegerVariable i)
 
bool operations_research::sat::VariableIsPositive (IntegerVariable i)
 
IntegerVariable operations_research::sat::PositiveVariable (IntegerVariable i)
 
 operations_research::sat::DEFINE_STRONG_INDEX_TYPE (PositiveOnlyIndex)
 Special type for storing only one thing for var and NegationOf(var).
 
PositiveOnlyIndex operations_research::sat::GetPositiveOnlyIndex (IntegerVariable var)
 
std::string operations_research::sat::IntegerTermDebugString (IntegerVariable var, IntegerValue coeff)
 
std::vector< IntegerVariable > operations_research::sat::NegationOf (const std::vector< IntegerVariable > &vars)
 Returns the vector of the negated variables.
 
std::ostream & operations_research::sat::operator<< (std::ostream &os, IntegerLiteral i_lit)
 
std::ostream & operations_research::sat::operator<< (std::ostream &os, absl::Span< const IntegerLiteral > literals)
 
template<typename H >
operations_research::sat::AbslHashValue (H h, const AffineExpression &e)
 
std::ostream & operations_research::sat::operator<< (std::ostream &os, const ValueLiteralPair &p)
 
std::function< BooleanVariable(Model *)> operations_research::sat::NewBooleanVariable ()
 
std::function< IntegerVariable(Model *)> operations_research::sat::ConstantIntegerVariable (int64_t value)
 
std::function< IntegerVariable(Model *)> operations_research::sat::NewIntegerVariable (int64_t lb, int64_t ub)
 
std::function< IntegerVariable(Model *)> operations_research::sat::NewIntegerVariable (const Domain &domain)
 
IntegerVariable operations_research::sat::CreateNewIntegerVariableFromLiteral (Literal lit, Model *model)
 
std::function< IntegerVariable(Model *)> operations_research::sat::NewIntegerVariableFromLiteral (Literal lit)
 
std::function< int64_t(const Model &)> operations_research::sat::LowerBound (IntegerVariable v)
 
std::function< int64_t(const Model &)> operations_research::sat::UpperBound (IntegerVariable v)
 
std::function< bool(const Model &)> operations_research::sat::IsFixed (IntegerVariable v)
 
std::function< int64_t(const Model &)> operations_research::sat::Value (IntegerVariable v)
 This checks that the variable is fixed.
 
std::function< void(Model *)> operations_research::sat::GreaterOrEqual (IntegerVariable v, int64_t lb)
 
std::function< void(Model *)> operations_research::sat::LowerOrEqual (IntegerVariable v, int64_t ub)
 
std::function< void(Model *)> operations_research::sat::Equality (IntegerVariable v, int64_t value)
 Fix v to a given value.
 
std::function< void(Model *)> operations_research::sat::Implication (absl::Span< const Literal > enforcement_literals, IntegerLiteral i)
 
std::function< void(Model *)> operations_research::sat::ImpliesInInterval (Literal in_interval, IntegerVariable v, int64_t lb, int64_t ub)
 in_interval => v in [lb, ub].
 
std::function< std::vector< ValueLiteralPair >(Model *)> operations_research::sat::FullyEncodeVariable (IntegerVariable var)