Google OR-Tools v9.15
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
operations_research::sat::LinearConstraint Struct Reference

Detailed Description

Definition at line 48 of file linear_constraint.h.

#include <linear_constraint.h>

Public Member Functions

 LinearConstraint ()=default
 LinearConstraint (IntegerValue _lb, IntegerValue _ub)
double NormalizedViolation (const util_intops::StrongVector< IntegerVariable, double > &lp_values) const
void resize (int size)
std::string DebugString () const
bool IsEqualIgnoringBounds (const LinearConstraint &other) const
void CopyFrom (const LinearConstraint &other)
bool operator== (const LinearConstraint &other) const
absl::Span< const IntegerVariable > VarsAsSpan () const
absl::Span< const IntegerValue > CoeffsAsSpan () const

Public Attributes

IntegerValue lb
IntegerValue ub
int num_terms = 0
std::unique_ptr< IntegerVariable[]> vars
std::unique_ptr< IntegerValue[]> coeffs

Constructor & Destructor Documentation

◆ LinearConstraint() [1/2]

operations_research::sat::LinearConstraint::LinearConstraint ( )
default

◆ LinearConstraint() [2/2]

operations_research::sat::LinearConstraint::LinearConstraint ( IntegerValue _lb,
IntegerValue _ub )
inline

Definition at line 67 of file linear_constraint.h.

Member Function Documentation

◆ CoeffsAsSpan()

absl::Span< const IntegerValue > operations_research::sat::LinearConstraint::CoeffsAsSpan ( ) const
inline

Definition at line 142 of file linear_constraint.h.

◆ CopyFrom()

void operations_research::sat::LinearConstraint::CopyFrom ( const LinearConstraint & other)
inline

Definition at line 123 of file linear_constraint.h.

◆ DebugString()

std::string operations_research::sat::LinearConstraint::DebugString ( ) const
inline

Definition at line 91 of file linear_constraint.h.

◆ IsEqualIgnoringBounds()

bool operations_research::sat::LinearConstraint::IsEqualIgnoringBounds ( const LinearConstraint & other) const
inline

Definition at line 106 of file linear_constraint.h.

◆ NormalizedViolation()

double operations_research::sat::LinearConstraint::NormalizedViolation ( const util_intops::StrongVector< IntegerVariable, double > & lp_values) const

Definition at line 174 of file linear_constraint.cc.

◆ operator==()

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

Definition at line 132 of file linear_constraint.h.

◆ resize()

void operations_research::sat::LinearConstraint::resize ( int size)
inline

Definition at line 77 of file linear_constraint.h.

◆ VarsAsSpan()

absl::Span< const IntegerVariable > operations_research::sat::LinearConstraint::VarsAsSpan ( ) const
inline

Definition at line 138 of file linear_constraint.h.

Member Data Documentation

◆ coeffs

std::unique_ptr<IntegerValue[]> operations_research::sat::LinearConstraint::coeffs

Definition at line 64 of file linear_constraint.h.

◆ lb

IntegerValue operations_research::sat::LinearConstraint::lb

Definition at line 49 of file linear_constraint.h.

◆ num_terms

int operations_research::sat::LinearConstraint::num_terms = 0

Definition at line 62 of file linear_constraint.h.

◆ ub

IntegerValue operations_research::sat::LinearConstraint::ub

Definition at line 50 of file linear_constraint.h.

◆ vars

std::unique_ptr<IntegerVariable[]> operations_research::sat::LinearConstraint::vars

Definition at line 63 of file linear_constraint.h.


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