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

#include <work_assignment.h>

Public Member Functions

 ProtoLiteral ()=default
 
 ProtoLiteral (int var, IntegerValue lb)
 
ProtoLiteral Negated () const
 
int proto_var () const
 
IntegerValue lb () const
 
bool operator== (const ProtoLiteral &other) const
 
bool operator!= (const ProtoLiteral &other) const
 
Literal Decode (CpModelMapping *, IntegerEncoder *) const
 Note you should only decode integer literals at the root level.
 

Static Public Member Functions

static std::optional< ProtoLiteralEncode (Literal, CpModelMapping *, IntegerEncoder *)
 
static std::optional< ProtoLiteralEncodeLiteral (Literal, CpModelMapping *)
 

Friends

template<typename H>
AbslHashValue (H h, const ProtoLiteral &literal)
 

Detailed Description

Definition at line 56 of file work_assignment.h.

Constructor & Destructor Documentation

◆ ProtoLiteral() [1/2]

operations_research::sat::ProtoLiteral::ProtoLiteral ( )
default

◆ ProtoLiteral() [2/2]

operations_research::sat::ProtoLiteral::ProtoLiteral ( int var,
IntegerValue lb )
inline

Definition at line 59 of file work_assignment.h.

Member Function Documentation

◆ Decode()

Literal operations_research::sat::ProtoLiteral::Decode ( CpModelMapping * mapping,
IntegerEncoder * encoder ) const

Note you should only decode integer literals at the root level.

Definition at line 79 of file work_assignment.cc.

◆ Encode()

std::optional< ProtoLiteral > operations_research::sat::ProtoLiteral::Encode ( Literal literal,
CpModelMapping * mapping,
IntegerEncoder * encoder )
static

Enodes a literal as a ProtoLiteral. This can encode literals that occur in the proto model, and also integer bounds literals.

Definition at line 114 of file work_assignment.cc.

◆ EncodeLiteral()

std::optional< ProtoLiteral > operations_research::sat::ProtoLiteral::EncodeLiteral ( Literal literal,
CpModelMapping * mapping )
static

As above, but will only encode literals that are boolean variables or their negations (i.e. not integer bounds literals).

Definition at line 131 of file work_assignment.cc.

◆ lb()

IntegerValue operations_research::sat::ProtoLiteral::lb ( ) const
inline

Definition at line 64 of file work_assignment.h.

◆ Negated()

ProtoLiteral operations_research::sat::ProtoLiteral::Negated ( ) const
inline

Definition at line 60 of file work_assignment.h.

◆ operator!=()

bool operations_research::sat::ProtoLiteral::operator!= ( const ProtoLiteral & other) const
inline

Definition at line 68 of file work_assignment.h.

◆ operator==()

bool operations_research::sat::ProtoLiteral::operator== ( const ProtoLiteral & other) const
inline

Definition at line 65 of file work_assignment.h.

◆ proto_var()

int operations_research::sat::ProtoLiteral::proto_var ( ) const
inline

Definition at line 63 of file work_assignment.h.

Friends And Related Symbol Documentation

◆ AbslHashValue

template<typename H>
H AbslHashValue ( H h,
const ProtoLiteral & literal )
friend

Definition at line 70 of file work_assignment.h.


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