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

#include <objective_storage.h>

Public Member Functions

bool empty () const
 
void DeleteVariable (VariableId deleted_variable, VariableId variable_checkpoint, const SparseSymmetricMatrix &quadratic_terms)
 

Public Attributes

bool direction = false
 
bool priority = false
 
bool offset = false
 
absl::flat_hash_set< VariableId > linear_coefficients
 
absl::flat_hash_set< std::pair< VariableId, VariableId > > quadratic_coefficients
 

Detailed Description

Definition at line 45 of file objective_storage.h.

Member Function Documentation

◆ DeleteVariable()

void operations_research::math_opt::ObjectiveStorage::Diff::SingleObjective::DeleteVariable ( VariableId deleted_variable,
VariableId variable_checkpoint,
const SparseSymmetricMatrix & quadratic_terms )

The quadratic coefficient diff is not indexed symmetrically, so we need additional information to determine which quadratic terms are dirty.

Definition at line 39 of file objective_storage.cc.

◆ empty()

bool operations_research::math_opt::ObjectiveStorage::Diff::SingleObjective::empty ( ) const
inline

Inline function implementation

Definition at line 238 of file objective_storage.h.

Member Data Documentation

◆ direction

bool operations_research::math_opt::ObjectiveStorage::Diff::SingleObjective::direction = false

Definition at line 53 of file objective_storage.h.

◆ linear_coefficients

absl::flat_hash_set<VariableId> operations_research::math_opt::ObjectiveStorage::Diff::SingleObjective::linear_coefficients

Only for terms where the variable is before the variable_checkpoint and, if an auxiliary objective, the objective is before the objective_checkpoint.

Definition at line 59 of file objective_storage.h.

◆ offset

bool operations_research::math_opt::ObjectiveStorage::Diff::SingleObjective::offset = false

Definition at line 55 of file objective_storage.h.

◆ priority

bool operations_research::math_opt::ObjectiveStorage::Diff::SingleObjective::priority = false

Definition at line 54 of file objective_storage.h.

◆ quadratic_coefficients

absl::flat_hash_set<std::pair<VariableId, VariableId> > operations_research::math_opt::ObjectiveStorage::Diff::SingleObjective::quadratic_coefficients

For each entry, first <= second (the matrix is symmetric). Only holds entries with both variables before the variable checkpoint and, if an auxiliary objective, the objective is before the objective_checkpoint.

Definition at line 66 of file objective_storage.h.


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