OR-Tools  9.6
IntegerEncoder

Detailed Description

Definition at line 420 of file integer.h.

Public Member Functions

 IntegerEncoder (Model *model)
 
 ~IntegerEncoder ()
 
void ReserveSpaceForNumVariables (int num_vars)
 
void FullyEncodeVariable (IntegerVariable var)
 
bool VariableIsFullyEncoded (IntegerVariable var) const
 
std::vector< ValueLiteralPairFullDomainEncoding (IntegerVariable var) const
 
std::vector< ValueLiteralPairPartialDomainEncoding (IntegerVariable var) const
 
std::pair< IntegerLiteral, IntegerLiteralCanonicalize (IntegerLiteral i_lit) const
 
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)
 
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
 
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
 
Literal GetTrueLiteral ()
 
Literal GetFalseLiteral ()
 
std::vector< ValueLiteralPairPartialGreaterThanEncoding (IntegerVariable var) const
 
bool UpdateEncodingOnInitialDomainChange (IntegerVariable var, Domain domain)
 

Constructor & Destructor Documentation

◆ IntegerEncoder()

IntegerEncoder ( Model model)
inlineexplicit

Definition at line 422 of file integer.h.

◆ ~IntegerEncoder()

~IntegerEncoder ( )
inline

Definition at line 429 of file integer.h.

Member Function Documentation

◆ AddAllImplicationsBetweenAssociatedLiterals()

void AddAllImplicationsBetweenAssociatedLiterals ( )

Definition at line 207 of file integer.cc.

◆ AssociateToIntegerEqualValue()

void AssociateToIntegerEqualValue ( Literal  literal,
IntegerVariable  var,
IntegerValue  value 
)

Definition at line 417 of file integer.cc.

◆ AssociateToIntegerLiteral()

void AssociateToIntegerLiteral ( Literal  literal,
IntegerLiteral  i_lit 
)

Definition at line 345 of file integer.cc.

◆ Canonicalize()

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

Definition at line 227 of file integer.cc.

◆ DisableImplicationBetweenLiteral()

void DisableImplicationBetweenLiteral ( )
inline

Definition at line 520 of file integer.h.

◆ FullDomainEncoding()

std::vector< ValueLiteralPair > FullDomainEncoding ( IntegerVariable  var) const

Definition at line 140 of file integer.cc.

◆ FullyEncodeVariable()

void FullyEncodeVariable ( IntegerVariable  var)

Definition at line 74 of file integer.cc.

◆ GetAllAssociatedVariables()

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

Definition at line 542 of file integer.h.

◆ GetAssociatedEqualityLiteral()

LiteralIndex GetAssociatedEqualityLiteral ( IntegerVariable  var,
IntegerValue  value 
) const

Definition at line 298 of file integer.cc.

◆ GetAssociatedLiteral()

LiteralIndex GetAssociatedLiteral ( IntegerLiteral  i_lit) const

Definition at line 517 of file integer.cc.

◆ GetEqualityLiterals()

const InlinedIntegerValueVector& GetEqualityLiterals ( Literal  lit) const
inline

Definition at line 533 of file integer.h.

◆ GetFalseLiteral()

Literal GetFalseLiteral ( )
inline

Definition at line 591 of file integer.h.

◆ GetIntegerLiterals()

const InlinedIntegerLiteralVector& GetIntegerLiterals ( Literal  lit) const
inline

Definition at line 524 of file integer.h.

◆ GetLiteralView()

const IntegerVariable GetLiteralView ( Literal  lit) const
inline

Definition at line 558 of file integer.h.

◆ GetOrCreateAssociatedLiteral()

Literal GetOrCreateAssociatedLiteral ( IntegerLiteral  i_lit)

Definition at line 254 of file integer.cc.

◆ GetOrCreateLiteralAssociatedToEquality()

Literal GetOrCreateLiteralAssociatedToEquality ( IntegerVariable  var,
IntegerValue  value 
)

Definition at line 308 of file integer.cc.

◆ GetTrueLiteral()

Literal GetTrueLiteral ( )
inline

Definition at line 581 of file integer.h.

◆ LiteralOrNegationHasView()

ABSL_MUST_USE_RESULT bool LiteralOrNegationHasView ( Literal  lit,
IntegerVariable *  view = nullptr,
bool *  view_is_direct = nullptr 
) const

Definition at line 559 of file integer.cc.

◆ PartialDomainEncoding()

std::vector< ValueLiteralPair > PartialDomainEncoding ( IntegerVariable  var) const

Definition at line 146 of file integer.cc.

◆ PartialGreaterThanEncoding()

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

Definition at line 579 of file integer.cc.

◆ ReserveSpaceForNumVariables()

void ReserveSpaceForNumVariables ( int  num_vars)

Definition at line 68 of file integer.cc.

◆ SearchForLiteralAtOrBefore()

LiteralIndex SearchForLiteralAtOrBefore ( IntegerLiteral  i_lit,
IntegerValue *  bound 
) const

Definition at line 531 of file integer.cc.

◆ UpdateEncodingOnInitialDomainChange()

bool UpdateEncodingOnInitialDomainChange ( IntegerVariable  var,
Domain  domain 
)

Definition at line 615 of file integer.cc.

◆ VariableIsFullyEncoded()

bool VariableIsFullyEncoded ( IntegerVariable  var) const

Definition at line 105 of file integer.cc.


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