Google OR-Tools v9.14
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
operations_research::LocalSearchState::Variable Class Reference

Detailed Description

A LocalSearchState Variable can only be created by a LocalSearchState, then it is meant to be passed by copy. If at some point the duplication of LocalSearchState pointers is too expensive, we could switch to index only, and the user would have to know the relevant state. The present setup allows to ensure that variable users will not misuse the state.

Definition at line 3034 of file constraint_solveri.h.

#include <constraint_solveri.h>

Public Member Functions

 Variable ()
int64_t Min () const
int64_t Max () const
bool SetMin (int64_t new_min) const
bool SetMax (int64_t new_max) const
void Relax () const
bool Exists () const

Friends

class LocalSearchState
 Only LocalSearchState can construct LocalSearchVariables.

Constructor & Destructor Documentation

◆ Variable()

operations_research::LocalSearchState::Variable::Variable ( )
inline

Definition at line 3036 of file constraint_solveri.h.

Member Function Documentation

◆ Exists()

bool operations_research::LocalSearchState::Variable::Exists ( ) const
inline

Definition at line 3065 of file constraint_solveri.h.

◆ Max()

int64_t operations_research::LocalSearchState::Variable::Max ( ) const
inline

Definition at line 3041 of file constraint_solveri.h.

◆ Min()

int64_t operations_research::LocalSearchState::Variable::Min ( ) const
inline

Definition at line 3037 of file constraint_solveri.h.

◆ Relax()

void operations_research::LocalSearchState::Variable::Relax ( ) const
inline

Definition at line 3059 of file constraint_solveri.h.

◆ SetMax()

bool operations_research::LocalSearchState::Variable::SetMax ( int64_t new_max) const
inline

Sets variable's maximum to min(Max(), new_max) and propagates the change. Returns true iff the variable domain is nonempty and propagation succeeded.

Definition at line 3054 of file constraint_solveri.h.

◆ SetMin()

bool operations_research::LocalSearchState::Variable::SetMin ( int64_t new_min) const
inline

Sets variable's minimum to max(Min(), new_min) and propagates the change. Returns true iff the variable domain is nonempty and propagation succeeded.

Definition at line 3047 of file constraint_solveri.h.

◆ LocalSearchState

friend class LocalSearchState
friend

Only LocalSearchState can construct LocalSearchVariables.

Definition at line 3069 of file constraint_solveri.h.


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