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

#include <integer_expr.h>

Inheritance diagram for operations_research::sat::SquarePropagator:
operations_research::sat::PropagatorInterface

Public Member Functions

 SquarePropagator (AffineExpression x, AffineExpression s, IntegerTrail *integer_trail)
 
 SquarePropagator (const SquarePropagator &)=delete
 This type is neither copyable nor movable.
 
SquarePropagatoroperator= (const SquarePropagator &)=delete
 
bool Propagate () final
 
void RegisterWith (GenericLiteralWatcher *watcher)
 
- Public Member Functions inherited from operations_research::sat::PropagatorInterface
 PropagatorInterface ()=default
 
virtual ~PropagatorInterface ()=default
 
virtual bool IncrementalPropagate (const std::vector< int > &)
 

Detailed Description

Propagates x * x = s.

Todo
(user): Only works for x nonnegative.

Definition at line 410 of file integer_expr.h.

Constructor & Destructor Documentation

◆ SquarePropagator() [1/2]

operations_research::sat::SquarePropagator::SquarePropagator ( AffineExpression x,
AffineExpression s,
IntegerTrail * integer_trail )

Definition at line 1159 of file integer_expr.cc.

◆ SquarePropagator() [2/2]

operations_research::sat::SquarePropagator::SquarePropagator ( const SquarePropagator & )
delete

This type is neither copyable nor movable.

Member Function Documentation

◆ operator=()

SquarePropagator & operations_research::sat::SquarePropagator::operator= ( const SquarePropagator & )
delete

◆ Propagate()

bool operations_research::sat::SquarePropagator::Propagate ( )
finalvirtual

Propagation from x to s: s in [min_x * min_x, max_x * max_x]. Propagation from s to x: x in [ceil(sqrt(min_s)), floor(sqrt(max_s))].

Implements operations_research::sat::PropagatorInterface.

Definition at line 1167 of file integer_expr.cc.

◆ RegisterWith()

void operations_research::sat::SquarePropagator::RegisterWith ( GenericLiteralWatcher * watcher)

Definition at line 1205 of file integer_expr.cc.


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