Google OR-Tools v9.11
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
operations_research::math_opt::internal::VariablesEquality Struct Reference

#include <variable_and_expressions.h>

Public Member Functions

 VariablesEquality (Variable lhs, Variable rhs)
 
 operator bool () const
 

Public Attributes

Variable lhs
 
Variable rhs
 

Detailed Description

The result of the equality comparison between two Variable.

We use an object here to delay the evaluation of equality so that we can use the operator== in two use-cases:

  1. when the user want to test that two Variable values references the same variable. This is supported by having this object support implicit conversion to bool.
  2. when the user want to use the equality to create a constraint of equality between two variables.

Definition at line 170 of file variable_and_expressions.h.

Constructor & Destructor Documentation

◆ VariablesEquality()

operations_research::math_opt::internal::VariablesEquality::VariablesEquality ( Variable lhs,
Variable rhs )
inline

Users are not expected to call this constructor. Instead they should only use the overload of operator== that returns this when comparing two Variable. For example x == y.

Definition at line 1736 of file variable_and_expressions.h.

Member Function Documentation

◆ operator bool()

operations_research::math_opt::internal::VariablesEquality::operator bool ( ) const
inline

Definition at line 1739 of file variable_and_expressions.h.

Member Data Documentation

◆ lhs

Variable operations_research::math_opt::internal::VariablesEquality::lhs

Definition at line 176 of file variable_and_expressions.h.

◆ rhs

Variable operations_research::math_opt::internal::VariablesEquality::rhs

Definition at line 177 of file variable_and_expressions.h.


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