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

#include <implied_bounds.h>

Public Member Functions

 ElementEncodings ()=default
 
void Add (IntegerVariable var, const std::vector< ValueLiteralPair > &encoding, int exactly_one_index)
 
const absl::btree_map< int, std::vector< ValueLiteralPair > > & Get (IntegerVariable var)
 Returns an empty map if there is no such encoding.
 
const std::vector< IntegerVariable > & GetElementEncodedVariables () const
 Get an unsorted set of variables appearing in element encodings.
 

Detailed Description

Definition at line 183 of file implied_bounds.h.

Constructor & Destructor Documentation

◆ ElementEncodings()

operations_research::sat::ElementEncodings::ElementEncodings ( )
default

Member Function Documentation

◆ Add()

void operations_research::sat::ElementEncodings::Add ( IntegerVariable var,
const std::vector< ValueLiteralPair > & encoding,
int exactly_one_index )

Register the fact that var = sum literal * value with sum literal == 1.

Note
we call this an "element" encoding because a value can appear more than once.

Definition at line 218 of file implied_bounds.cc.

◆ Get()

const absl::btree_map< int, std::vector< ValueLiteralPair > > & operations_research::sat::ElementEncodings::Get ( IntegerVariable var)

Returns an empty map if there is no such encoding.

Definition at line 228 of file implied_bounds.cc.

◆ GetElementEncodedVariables()

const std::vector< IntegerVariable > & operations_research::sat::ElementEncodings::GetElementEncodedVariables ( ) const

Get an unsorted set of variables appearing in element encodings.

Definition at line 238 of file implied_bounds.cc.


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