Google OR-Tools v9.14
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
integer_base.h File Reference
#include <stdlib.h>
#include <algorithm>
#include <cstdint>
#include <limits>
#include <numeric>
#include <ostream>
#include <string>
#include <utility>
#include <vector>
#include "absl/container/flat_hash_map.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/sat_base.h"
#include "ortools/util/saturated_arithmetic.h"
#include "ortools/util/sorted_interval_list.h"
#include "ortools/util/strong_integers.h"

Go to the source code of this file.

Classes

struct  operations_research::sat::LevelZeroCallbackHelper
struct  operations_research::sat::IntegerLiteral
struct  operations_research::sat::AffineExpression
struct  operations_research::sat::LinearExpression2
class  operations_research::sat::BestBinaryRelationBounds
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

Namespaces

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

Enumerations

enum class  operations_research::sat::RelationStatus { operations_research::sat::IS_TRUE , operations_research::sat::IS_FALSE , operations_research::sat::IS_UNKNOWN }

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.
bool operations_research::sat::AddSquareTo (IntegerValue a, IntegerValue *result)
 Computes result += a * a, 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 (absl::Span< const 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 LinearExpression2 &expr)
template<typename H>
operations_research::sat::AbslHashValue (H h, const LinearExpression2 &e)
std::ostream & operations_research::sat::operator<< (std::ostream &os, const ValueLiteralPair &p)
 operations_research::sat::DEFINE_STRONG_INDEX_TYPE (IntervalVariable)
const IntervalVariable operations_research::sat::kNoIntervalVariable (-1)