![]() |
Google OR-Tools v9.15
a fast and portable software suite for combinatorial optimization
|
Definition at line 38 of file objective_storage.h.
#include <objective_storage.h>
Classes | |
| struct | Diff |
Public Member Functions | |
| ObjectiveStorage (absl::string_view name={}) | |
| AuxiliaryObjectiveId | AddAuxiliaryObjective (int64_t priority, absl::string_view name) |
| bool | maximize (ObjectiveId id) const |
| int64_t | priority (ObjectiveId id) const |
| double | offset (ObjectiveId id) const |
| double | linear_term (ObjectiveId id, VariableId v) const |
| double | quadratic_term (ObjectiveId id, VariableId v1, VariableId v2) const |
| const std::string & | name (ObjectiveId id) const |
| const absl::flat_hash_map< VariableId, double > & | linear_terms (ObjectiveId id) const |
| const SparseSymmetricMatrix & | quadratic_terms (ObjectiveId id) const |
| template<typename DiffIter> | |
| void | set_maximize (ObjectiveId id, bool maximize, const iterator_range< DiffIter > &diffs) |
| template<typename DiffIter> | |
| void | set_priority (ObjectiveId id, int64_t priority, const iterator_range< DiffIter > &diffs) |
| template<typename DiffIter> | |
| void | set_offset (ObjectiveId id, double offset, const iterator_range< DiffIter > &diffs) |
| template<typename DiffIter> | |
| void | set_linear_term (ObjectiveId id, VariableId variable, double value, const iterator_range< DiffIter > &diffs) |
| template<typename DiffIter> | |
| void | set_quadratic_term (ObjectiveId id, VariableId v1, VariableId v2, double val, const iterator_range< DiffIter > &diffs) |
| template<typename DiffIter> | |
| void | Delete (AuxiliaryObjectiveId id, const iterator_range< DiffIter > &diffs) |
| int64_t | num_auxiliary_objectives () const |
| AuxiliaryObjectiveId | next_id () const |
| void | ensure_next_id_at_least (AuxiliaryObjectiveId minimum) |
| bool | contains (AuxiliaryObjectiveId id) const |
| std::vector< AuxiliaryObjectiveId > | AuxiliaryObjectives () const |
| std::vector< AuxiliaryObjectiveId > | SortedAuxiliaryObjectives () const |
| template<typename DiffIter> | |
| void | Clear (ObjectiveId id, const iterator_range< DiffIter > &diffs) |
| template<typename DiffIter> | |
| void | DeleteVariable (VariableId variable, const iterator_range< DiffIter > &diffs) |
| std::pair< ObjectiveProto, google::protobuf::Map< int64_t, ObjectiveProto > > | Proto () const |
| bool | diff_is_empty (const Diff &diff) const |
| std::pair< ObjectiveUpdatesProto, AuxiliaryObjectivesUpdatesProto > | 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 |
|
inlineexplicit |
Definition at line 248 of file objective_storage.h.
| AuxiliaryObjectiveId operations_research::math_opt::ObjectiveStorage::AddAuxiliaryObjective | ( | int64_t | priority, |
| absl::string_view | name ) |
Definition at line 66 of file objective_storage.cc.
| void operations_research::math_opt::ObjectiveStorage::AdvanceCheckpointInDiff | ( | VariableId | variable_checkpoint, |
| Diff & | diff ) const |
Definition at line 204 of file objective_storage.cc.
| std::vector< AuxiliaryObjectiveId > operations_research::math_opt::ObjectiveStorage::AuxiliaryObjectives | ( | ) | const |
Definition at line 79 of file objective_storage.cc.
| void operations_research::math_opt::ObjectiveStorage::Clear | ( | ObjectiveId | id, |
| const iterator_range< DiffIter > & | diffs ) |
Definition at line 392 of file objective_storage.h.
|
inline |
Definition at line 387 of file objective_storage.h.
| void operations_research::math_opt::ObjectiveStorage::Delete | ( | AuxiliaryObjectiveId | id, |
| const iterator_range< DiffIter > & | diffs ) |
Definition at line 362 of file objective_storage.h.
| void operations_research::math_opt::ObjectiveStorage::DeleteVariable | ( | VariableId | variable, |
| const iterator_range< DiffIter > & | diffs ) |
Definition at line 416 of file objective_storage.h.
|
inline |
Definition at line 430 of file objective_storage.h.
|
inline |
Definition at line 382 of file objective_storage.h.
|
inline |
Definition at line 264 of file objective_storage.h.
|
inline |
Definition at line 279 of file objective_storage.h.
|
inline |
Definition at line 252 of file objective_storage.h.
|
inline |
Definition at line 275 of file objective_storage.h.
|
inline |
Definition at line 378 of file objective_storage.h.
|
inline |
Definition at line 374 of file objective_storage.h.
|
inline |
Definition at line 260 of file objective_storage.h.
|
inline |
Definition at line 256 of file objective_storage.h.
| std::pair< ObjectiveProto, google::protobuf::Map< int64_t, ObjectiveProto > > operations_research::math_opt::ObjectiveStorage::Proto | ( | ) | const |
Definition at line 97 of file objective_storage.cc.
|
inline |
Definition at line 269 of file objective_storage.h.
|
inline |
Definition at line 284 of file objective_storage.h.
| void operations_research::math_opt::ObjectiveStorage::set_linear_term | ( | ObjectiveId | id, |
| VariableId | variable, | ||
| double | value, | ||
| const iterator_range< DiffIter > & | diffs ) |
Definition at line 333 of file objective_storage.h.
| void operations_research::math_opt::ObjectiveStorage::set_maximize | ( | ObjectiveId | id, |
| bool | maximize, | ||
| const iterator_range< DiffIter > & | diffs ) |
Definition at line 290 of file objective_storage.h.
| void operations_research::math_opt::ObjectiveStorage::set_offset | ( | ObjectiveId | id, |
| double | offset, | ||
| const iterator_range< DiffIter > & | diffs ) |
Definition at line 319 of file objective_storage.h.
| void operations_research::math_opt::ObjectiveStorage::set_priority | ( | ObjectiveId | id, |
| int64_t | priority, | ||
| const iterator_range< DiffIter > & | diffs ) |
Definition at line 304 of file objective_storage.h.
| void operations_research::math_opt::ObjectiveStorage::set_quadratic_term | ( | ObjectiveId | id, |
| VariableId | v1, | ||
| VariableId | v2, | ||
| double | val, | ||
| const iterator_range< DiffIter > & | diffs ) |
Definition at line 347 of file objective_storage.h.
| std::vector< AuxiliaryObjectiveId > operations_research::math_opt::ObjectiveStorage::SortedAuxiliaryObjectives | ( | ) | const |
Definition at line 89 of file objective_storage.cc.
| std::pair< ObjectiveUpdatesProto, AuxiliaryObjectivesUpdatesProto > operations_research::math_opt::ObjectiveStorage::Update | ( | const Diff & | diff, |
| const absl::flat_hash_set< VariableId > & | deleted_variables, | ||
| absl::Span< const VariableId > | new_variables ) const |
Definition at line 159 of file objective_storage.cc.