Google OR-Tools v9.15
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
operations_research::math_opt::LinearConstraintStorage Class Reference

Detailed Description

Definition at line 45 of file linear_constraint_storage.h.

#include <linear_constraint_storage.h>

Classes

struct  Diff
struct  UpdateResult

Public Member Functions

LinearConstraintId Add (double lower_bound, double upper_bound, absl::string_view name)
double lower_bound (LinearConstraintId id) const
double upper_bound (LinearConstraintId id) const
const std::string & name (LinearConstraintId id) const
template<typename DiffIter>
void set_lower_bound (LinearConstraintId id, double lower_bound, const iterator_range< DiffIter > &diffs)
template<typename DiffIter>
void set_upper_bound (LinearConstraintId id, double upper_bound, const iterator_range< DiffIter > &diffs)
template<typename DiffIter>
void Delete (LinearConstraintId id, const iterator_range< DiffIter > &diffs)
int64_t size () const
LinearConstraintId next_id () const
void ensure_next_id_at_least (LinearConstraintId minimum)
bool contains (LinearConstraintId id) const
std::vector< LinearConstraintIdLinearConstraints () const
std::vector< LinearConstraintIdSortedLinearConstraints () const
template<typename DiffIter>
void DeleteVariable (VariableId variable, const iterator_range< DiffIter > &diffs)
template<typename DiffIter>
void set_term (LinearConstraintId constraint, VariableId variable, double value, const iterator_range< DiffIter > &diffs)
const SparseMatrix< LinearConstraintId, VariableId > & matrix () const
std::pair< LinearConstraintsProto, SparseDoubleMatrixProtoProto () const
bool diff_is_empty (const Diff &diff) const
UpdateResult Update (const Diff &diff, const absl::flat_hash_set< VariableId > &deleted_variables, absl::Span< const VariableId > new_variables) const
void AdvanceCheckpointInDiff (VariableId variable_checkpoint, Diff &diff) const

Member Function Documentation

◆ Add()

LinearConstraintId operations_research::math_opt::LinearConstraintStorage::Add ( double lower_bound,
double upper_bound,
absl::string_view name )

Definition at line 36 of file linear_constraint_storage.cc.

◆ AdvanceCheckpointInDiff()

void operations_research::math_opt::LinearConstraintStorage::AdvanceCheckpointInDiff ( VariableId variable_checkpoint,
Diff & diff ) const

Definition at line 114 of file linear_constraint_storage.cc.

◆ contains()

bool operations_research::math_opt::LinearConstraintStorage::contains ( LinearConstraintId id) const
inline

Definition at line 293 of file linear_constraint_storage.h.

◆ Delete()

template<typename DiffIter>
void operations_research::math_opt::LinearConstraintStorage::Delete ( LinearConstraintId id,
const iterator_range< DiffIter > & diffs )

Definition at line 246 of file linear_constraint_storage.h.

◆ DeleteVariable()

template<typename DiffIter>
void operations_research::math_opt::LinearConstraintStorage::DeleteVariable ( VariableId variable,
const iterator_range< DiffIter > & diffs )

Definition at line 267 of file linear_constraint_storage.h.

◆ diff_is_empty()

bool operations_research::math_opt::LinearConstraintStorage::diff_is_empty ( const Diff & diff) const
inline

Definition at line 313 of file linear_constraint_storage.h.

◆ ensure_next_id_at_least()

void operations_research::math_opt::LinearConstraintStorage::ensure_next_id_at_least ( LinearConstraintId minimum)
inline

Definition at line 288 of file linear_constraint_storage.h.

◆ LinearConstraints()

std::vector< LinearConstraintId > operations_research::math_opt::LinearConstraintStorage::LinearConstraints ( ) const

Definition at line 48 of file linear_constraint_storage.cc.

◆ lower_bound()

double operations_research::math_opt::LinearConstraintStorage::lower_bound ( LinearConstraintId id) const
inline

Definition at line 200 of file linear_constraint_storage.h.

◆ matrix()

const SparseMatrix< LinearConstraintId, VariableId > & operations_research::math_opt::LinearConstraintStorage::matrix ( ) const
inline

Definition at line 139 of file linear_constraint_storage.h.

◆ name()

const std::string & operations_research::math_opt::LinearConstraintStorage::name ( LinearConstraintId id) const
inline

Definition at line 208 of file linear_constraint_storage.h.

◆ next_id()

LinearConstraintId operations_research::math_opt::LinearConstraintStorage::next_id ( ) const
inline

Definition at line 286 of file linear_constraint_storage.h.

◆ Proto()

std::pair< LinearConstraintsProto, SparseDoubleMatrixProto > operations_research::math_opt::LinearConstraintStorage::Proto ( ) const

Definition at line 77 of file linear_constraint_storage.cc.

◆ set_lower_bound()

template<typename DiffIter>
void operations_research::math_opt::LinearConstraintStorage::set_lower_bound ( LinearConstraintId id,
double lower_bound,
const iterator_range< DiffIter > & diffs )

Definition at line 214 of file linear_constraint_storage.h.

◆ set_term()

template<typename DiffIter>
void operations_research::math_opt::LinearConstraintStorage::set_term ( LinearConstraintId constraint,
VariableId variable,
double value,
const iterator_range< DiffIter > & diffs )

Definition at line 298 of file linear_constraint_storage.h.

◆ set_upper_bound()

template<typename DiffIter>
void operations_research::math_opt::LinearConstraintStorage::set_upper_bound ( LinearConstraintId id,
double upper_bound,
const iterator_range< DiffIter > & diffs )

Definition at line 230 of file linear_constraint_storage.h.

◆ size()

int64_t operations_research::math_opt::LinearConstraintStorage::size ( ) const
inline

Definition at line 282 of file linear_constraint_storage.h.

◆ SortedLinearConstraints()

std::vector< LinearConstraintId > operations_research::math_opt::LinearConstraintStorage::SortedLinearConstraints ( ) const

Definition at line 58 of file linear_constraint_storage.cc.

◆ Update()

LinearConstraintStorage::UpdateResult operations_research::math_opt::LinearConstraintStorage::Update ( const Diff & diff,
const absl::flat_hash_set< VariableId > & deleted_variables,
absl::Span< const VariableId > new_variables ) const

Definition at line 125 of file linear_constraint_storage.cc.

◆ upper_bound()

double operations_research::math_opt::LinearConstraintStorage::upper_bound ( LinearConstraintId id) const
inline

Definition at line 204 of file linear_constraint_storage.h.


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