Google OR-Tools v9.15
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
operations_research::sat::IntegerEncoder Class Reference

Detailed Description

Definition at line 106 of file integer.h.

#include <integer.h>

Public Member Functions

 IntegerEncoder (Model *model)
 IntegerEncoder (const IntegerEncoder &)=delete
IntegerEncoderoperator= (const IntegerEncoder &)=delete
 ~IntegerEncoder ()
void ReserveSpaceForNumVariables (int num_vars)
void FullyEncodeVariable (IntegerVariable var)
bool VariableIsFullyEncoded (IntegerVariable var) const
const std::vector< ValueLiteralPair > & FullDomainEncoding (IntegerVariable var) const
const std::vector< ValueLiteralPair > & PartialDomainEncoding (IntegerVariable var) const
std::pair< IntegerLiteral, IntegerLiteralCanonicalize (IntegerLiteral i_lit) const
bool VariableDomainHasHoles (IntegerVariable var)
Literal GetOrCreateAssociatedLiteral (IntegerLiteral i_lit)
Literal GetOrCreateLiteralAssociatedToEquality (IntegerVariable var, IntegerValue value)
void AssociateToIntegerLiteral (Literal literal, IntegerLiteral i_lit)
void AssociateToIntegerEqualValue (Literal literal, IntegerVariable var, IntegerValue value)
bool IsFixedOrHasAssociatedLiteral (IntegerLiteral i_lit) const
LiteralIndex GetAssociatedLiteral (IntegerLiteral i_lit) const
LiteralIndex GetAssociatedEqualityLiteral (IntegerVariable var, IntegerValue value) const
void DisableImplicationBetweenLiteral ()
void AddAllImplicationsBetweenAssociatedLiterals ()
const InlinedIntegerLiteralVectorGetIntegerLiterals (Literal lit) const
const InlinedIntegerValueVectorGetEqualityLiterals (Literal lit) const
const std::vector< IntegerVariable > & GetAllAssociatedVariables (Literal lit) const
IntegerVariable GetLiteralView (Literal lit) const
ABSL_MUST_USE_RESULT bool LiteralOrNegationHasView (Literal lit, IntegerVariable *view=nullptr, bool *view_is_direct=nullptr) const
LiteralIndex SearchForLiteralAtOrBefore (IntegerLiteral i_lit, IntegerValue *bound) const
LiteralIndex SearchForLiteralAtOrAfter (IntegerLiteral i_lit, IntegerValue *bound) const
Literal GetTrueLiteral ()
Literal GetFalseLiteral ()
std::vector< ValueLiteralPairPartialGreaterThanEncoding (IntegerVariable var) const
bool UpdateEncodingOnInitialDomainChange (IntegerVariable var, Domain domain)
int NumVariables () const

Constructor & Destructor Documentation

◆ IntegerEncoder() [1/2]

operations_research::sat::IntegerEncoder::IntegerEncoder ( Model * model)
inlineexplicit

Definition at line 108 of file integer.h.

◆ IntegerEncoder() [2/2]

operations_research::sat::IntegerEncoder::IntegerEncoder ( const IntegerEncoder & )
delete

◆ ~IntegerEncoder()

operations_research::sat::IntegerEncoder::~IntegerEncoder ( )
inline

Definition at line 121 of file integer.h.

Member Function Documentation

◆ AddAllImplicationsBetweenAssociatedLiterals()

void operations_research::sat::IntegerEncoder::AddAllImplicationsBetweenAssociatedLiterals ( )

Definition at line 227 of file integer.cc.

◆ AssociateToIntegerEqualValue()

void operations_research::sat::IntegerEncoder::AssociateToIntegerEqualValue ( Literal literal,
IntegerVariable var,
IntegerValue value )

Definition at line 435 of file integer.cc.

◆ AssociateToIntegerLiteral()

void operations_research::sat::IntegerEncoder::AssociateToIntegerLiteral ( Literal literal,
IntegerLiteral i_lit )

Definition at line 365 of file integer.cc.

◆ Canonicalize()

std::pair< IntegerLiteral, IntegerLiteral > operations_research::sat::IntegerEncoder::Canonicalize ( IntegerLiteral i_lit) const

Definition at line 247 of file integer.cc.

◆ DisableImplicationBetweenLiteral()

void operations_research::sat::IntegerEncoder::DisableImplicationBetweenLiteral ( )
inline

Definition at line 225 of file integer.h.

◆ FullDomainEncoding()

const std::vector< ValueLiteralPair > & operations_research::sat::IntegerEncoder::FullDomainEncoding ( IntegerVariable var) const

Definition at line 146 of file integer.cc.

◆ FullyEncodeVariable()

void operations_research::sat::IntegerEncoder::FullyEncodeVariable ( IntegerVariable var)

Definition at line 80 of file integer.cc.

◆ GetAllAssociatedVariables()

const std::vector< IntegerVariable > & operations_research::sat::IntegerEncoder::GetAllAssociatedVariables ( Literal lit) const
inline

Definition at line 247 of file integer.h.

◆ GetAssociatedEqualityLiteral()

LiteralIndex operations_research::sat::IntegerEncoder::GetAssociatedEqualityLiteral ( IntegerVariable var,
IntegerValue value ) const

Definition at line 318 of file integer.cc.

◆ GetAssociatedLiteral()

LiteralIndex operations_research::sat::IntegerEncoder::GetAssociatedLiteral ( IntegerLiteral i_lit) const

Definition at line 533 of file integer.cc.

◆ GetEqualityLiterals()

const InlinedIntegerValueVector & operations_research::sat::IntegerEncoder::GetEqualityLiterals ( Literal lit) const
inline

Definition at line 238 of file integer.h.

◆ GetFalseLiteral()

Literal operations_research::sat::IntegerEncoder::GetFalseLiteral ( )
inline

Definition at line 311 of file integer.h.

◆ GetIntegerLiterals()

const InlinedIntegerLiteralVector & operations_research::sat::IntegerEncoder::GetIntegerLiterals ( Literal lit) const
inline

Definition at line 229 of file integer.h.

◆ GetLiteralView()

IntegerVariable operations_research::sat::IntegerEncoder::GetLiteralView ( Literal lit) const
inline

Definition at line 265 of file integer.h.

◆ GetOrCreateAssociatedLiteral()

Literal operations_research::sat::IntegerEncoder::GetOrCreateAssociatedLiteral ( IntegerLiteral i_lit)

Definition at line 274 of file integer.cc.

◆ GetOrCreateLiteralAssociatedToEquality()

Literal operations_research::sat::IntegerEncoder::GetOrCreateLiteralAssociatedToEquality ( IntegerVariable var,
IntegerValue value )

Definition at line 328 of file integer.cc.

◆ GetTrueLiteral()

Literal operations_research::sat::IntegerEncoder::GetTrueLiteral ( )
inline

Definition at line 292 of file integer.h.

◆ IsFixedOrHasAssociatedLiteral()

bool operations_research::sat::IntegerEncoder::IsFixedOrHasAssociatedLiteral ( IntegerLiteral i_lit) const

Definition at line 524 of file integer.cc.

◆ LiteralOrNegationHasView()

ABSL_MUST_USE_RESULT bool operations_research::sat::IntegerEncoder::LiteralOrNegationHasView ( Literal lit,
IntegerVariable * view = nullptr,
bool * view_is_direct = nullptr ) const

Definition at line 600 of file integer.cc.

◆ NumVariables()

int operations_research::sat::IntegerEncoder::NumVariables ( ) const
inline

Definition at line 325 of file integer.h.

◆ operator=()

IntegerEncoder & operations_research::sat::IntegerEncoder::operator= ( const IntegerEncoder & )
delete

◆ PartialDomainEncoding()

const std::vector< ValueLiteralPair > & operations_research::sat::IntegerEncoder::PartialDomainEncoding ( IntegerVariable var) const

Definition at line 152 of file integer.cc.

◆ PartialGreaterThanEncoding()

std::vector< ValueLiteralPair > operations_research::sat::IntegerEncoder::PartialGreaterThanEncoding ( IntegerVariable var) const

Definition at line 620 of file integer.cc.

◆ ReserveSpaceForNumVariables()

void operations_research::sat::IntegerEncoder::ReserveSpaceForNumVariables ( int num_vars)

Definition at line 74 of file integer.cc.

◆ SearchForLiteralAtOrAfter()

LiteralIndex operations_research::sat::IntegerEncoder::SearchForLiteralAtOrAfter ( IntegerLiteral i_lit,
IntegerValue * bound ) const

Definition at line 575 of file integer.cc.

◆ SearchForLiteralAtOrBefore()

LiteralIndex operations_research::sat::IntegerEncoder::SearchForLiteralAtOrBefore ( IntegerLiteral i_lit,
IntegerValue * bound ) const

Definition at line 547 of file integer.cc.

◆ UpdateEncodingOnInitialDomainChange()

bool operations_research::sat::IntegerEncoder::UpdateEncodingOnInitialDomainChange ( IntegerVariable var,
Domain domain )

Definition at line 656 of file integer.cc.

◆ VariableDomainHasHoles()

bool operations_research::sat::IntegerEncoder::VariableDomainHasHoles ( IntegerVariable var)
inline

Definition at line 180 of file integer.h.

◆ VariableIsFullyEncoded()

bool operations_research::sat::IntegerEncoder::VariableIsFullyEncoded ( IntegerVariable var) const

Definition at line 111 of file integer.cc.


The documentation for this class was generated from the following files: