![]() |
Google OR-Tools v9.15
a fast and portable software suite for combinatorial optimization
|
Definition at line 84 of file synchronization.h.
#include <synchronization.h>
Classes | |
| struct | Solution |
Public Member Functions | |
| SharedSolutionRepository (int num_solutions_to_keep, absl::string_view name="", int source_id=-1) | |
| int | NumSolutions () const |
| std::shared_ptr< const Solution > | GetSolution (int index) const |
| int64_t | GetBestRank () const |
| std::vector< std::shared_ptr< const Solution > > | GetBestNSolutions (int n) const |
| ValueType | GetVariableValueInSolution (int var_index, int solution_index) const |
| std::shared_ptr< const Solution > | GetRandomBiasedSolution (absl::BitGenRef random) const |
| std::shared_ptr< const Solution > | Add (Solution solution) |
| void | Synchronize (std::function< void(const Solution &solution)> f=nullptr) |
| std::vector< std::string > | TableLineStats () const |
| int64_t | NumRecentlyNonImproving () const |
| void | ClearSolutionsAndIncreaseSourceId () |
| int | source_id () const |
| int | num_queried () const |
| int | num_solutions_to_keep () const |
| void | SetDiversityLimit (int value) |
Protected Member Functions | |
| int source_id_ | ABSL_GUARDED_BY (mutex_) |
| int64_t num_added_ | ABSL_GUARDED_BY (mutex_)=0 |
| int64_t num_queried_ | ABSL_GUARDED_BY (mutex_)=0 |
| int64_t num_synchronization_ | ABSL_GUARDED_BY (mutex_)=0 |
| int64_t num_queried_at_last_sync_ | ABSL_GUARDED_BY (mutex_)=0 |
| int64_t num_non_improving_ | ABSL_GUARDED_BY (mutex_)=0 |
| std::vector< int > tmp_indices_ | ABSL_GUARDED_BY (mutex_) |
| std::vector< std::shared_ptr< Solution > > solutions_ | ABSL_GUARDED_BY (mutex_) |
| std::vector< std::shared_ptr< Solution > > new_solutions_ | ABSL_GUARDED_BY (mutex_) |
| std::vector< int64_t > | ABSL_GUARDED_BY (mutex_) distances_ |
| std::vector< int64_t > | ABSL_GUARDED_BY (mutex_) buffer_ |
Protected Attributes | |
| const std::string | name_ |
| const int | num_solutions_to_keep_ |
| int | diversity_limit_ = 10 |
| absl::Mutex | mutex_ |
|
inlineexplicit |
Definition at line 86 of file synchronization.h.
|
protected |
|
protected |
|
mutableprotected |
|
protected |
|
protected |
|
protected |
|
mutableprotectedpure virtual |
|
mutableprotectedpure virtual |
|
protectedpure virtual |
|
mutableprotectedpure virtual |
|
protectedpure virtual |
| std::shared_ptr< const typename SharedSolutionRepository< ValueType >::Solution > operations_research::sat::SharedSolutionRepository< ValueType >::Add | ( | Solution | solution | ) |
Definition at line 1141 of file synchronization.h.
|
inline |
Definition at line 178 of file synchronization.h.
| std::vector< std::shared_ptr< const typename SharedSolutionRepository< ValueType >::Solution > > operations_research::sat::SharedSolutionRepository< ValueType >::GetBestNSolutions | ( | int | n | ) | const |
Definition at line 1065 of file synchronization.h.
| int64_t operations_research::sat::SharedSolutionRepository< ValueType >::GetBestRank | ( | ) | const |
Definition at line 1056 of file synchronization.h.
| std::shared_ptr< const typename SharedSolutionRepository< ValueType >::Solution > operations_research::sat::SharedSolutionRepository< ValueType >::GetRandomBiasedSolution | ( | absl::BitGenRef | random | ) | const |
Definition at line 1097 of file synchronization.h.
| std::shared_ptr< const typename SharedSolutionRepository< ValueType >::Solution > operations_research::sat::SharedSolutionRepository< ValueType >::GetSolution | ( | int | index | ) | const |
Definition at line 1048 of file synchronization.h.
| ValueType operations_research::sat::SharedSolutionRepository< ValueType >::GetVariableValueInSolution | ( | int | var_index, |
| int | solution_index ) const |
Definition at line 1088 of file synchronization.h.
|
inline |
Definition at line 190 of file synchronization.h.
|
inline |
Definition at line 195 of file synchronization.h.
|
inline |
Definition at line 173 of file synchronization.h.
| int operations_research::sat::SharedSolutionRepository< ValueType >::NumSolutions | ( | ) | const |
Definition at line 1041 of file synchronization.h.
|
inline |
Definition at line 197 of file synchronization.h.
|
inline |
Definition at line 185 of file synchronization.h.
| void operations_research::sat::SharedSolutionRepository< ValueType >::Synchronize | ( | std::function< void(const Solution &solution)> | f = nullptr | ) |
Definition at line 1155 of file synchronization.h.
|
inline |
Definition at line 167 of file synchronization.h.
|
protected |
Definition at line 202 of file synchronization.h.
|
mutableprotected |
Definition at line 204 of file synchronization.h.
|
protected |
Definition at line 200 of file synchronization.h.
|
protected |
Definition at line 201 of file synchronization.h.