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

Detailed Description

Definition at line 58 of file set_cover_model.h.

#include <set_cover_model.h>

Inheritance diagram for operations_research::SetCoverModel:
operations_research::scp::CoreModel operations_research::scp::FullToCoreModel

Classes

struct  Stats

Public Member Functions

 SetCoverModel (const absl::string_view name="SetCoverModel")
std::string name () const
void SetName (const absl::string_view name)
bool IsEmpty () const
BaseInt num_elements () const
BaseInt num_subsets () const
int64_t num_nonzeros () const
double FillRate () const
BaseInt ComputeNumSingletonColumns () const
BaseInt ComputeNumSingletonRows () const
const SubsetCostVectorsubset_costs () const
bool is_unicost ()
const SparseColumnViewcolumns () const
const SparseRowViewrows () const
bool row_view_is_valid () const
util_intops::StrongIntRange< SubsetIndex > SubsetRange () const
util_intops::StrongIntRange< ElementIndex > ElementRange () const
std::vector< SubsetIndex > all_subsets () const
absl::Duration generation_duration () const
absl::Duration create_sparse_row_view_duration () const
absl::Duration compute_sparse_row_view_using_slices_duration () const
void AddEmptySubset (Cost cost)
void AddElementToLastSubset (BaseInt element)
void AddElementToLastSubset (ElementIndex element)
void SetSubsetCost (BaseInt subset, Cost cost)
void SetSubsetCost (SubsetIndex subset, Cost cost)
void AddElementToSubset (BaseInt element, BaseInt subset)
void AddElementToSubset (ElementIndex element, SubsetIndex subset)
void SortElementsInSubsets ()
void CreateSparseRowView ()
SparseRowView ComputeSparseRowViewUsingSlices ()
std::vector< SubsetIndex > ComputeSliceIndices (int num_partitions)
SparseRowView ComputeSparseRowViewSlice (SubsetIndex begin_subset, SubsetIndex end_subset)
std::vector< SparseRowViewCutSparseRowViewInSlices (absl::Span< const SubsetIndex > partition_points)
SparseRowView ReduceSparseRowViewSlices (absl::Span< const SparseRowView > row_slices)
bool ComputeFeasibility ()
void ResizeNumSubsets (BaseInt num_subsets)
void ResizeNumSubsets (SubsetIndex num_subsets)
void ReserveNumElementsInSubset (BaseInt num_elements, BaseInt subset)
SetCoverProto ExportModelAsProto () const
void ImportModelFromProto (const SetCoverProto &message)
std::string ToVerboseString (absl::string_view sep) const
std::string ToString (absl::string_view sep) const
Stats ComputeCostStats () const
Stats ComputeRowStats () const
Stats ComputeColumnStats () const
std::vector< int64_t > ComputeRowDeciles () const
std::vector< int64_t > ComputeColumnDeciles () const
Stats ComputeRowDeltaSizeStats () const
Stats ComputeColumnDeltaSizeStats () const

Static Public Member Functions

static SetCoverModel GenerateRandomModelFrom (const SetCoverModel &seed_model, BaseInt num_elements, BaseInt num_subsets, double row_scale, double column_scale, double cost_scale)

Constructor & Destructor Documentation

◆ SetCoverModel()

operations_research::SetCoverModel::SetCoverModel ( const absl::string_view name = "SetCoverModel")
inlineexplicit

Definition at line 61 of file set_cover_model.h.

Member Function Documentation

◆ AddElementToLastSubset() [1/2]

void operations_research::SetCoverModel::AddElementToLastSubset ( BaseInt element)

Definition at line 258 of file set_cover_model.cc.

◆ AddElementToLastSubset() [2/2]

void operations_research::SetCoverModel::AddElementToLastSubset ( ElementIndex element)

Definition at line 267 of file set_cover_model.cc.

◆ AddElementToSubset() [1/2]

void operations_research::SetCoverModel::AddElementToSubset ( BaseInt element,
BaseInt subset )

Definition at line 292 of file set_cover_model.cc.

◆ AddElementToSubset() [2/2]

void operations_research::SetCoverModel::AddElementToSubset ( ElementIndex element,
SubsetIndex subset )

Definition at line 306 of file set_cover_model.cc.

◆ AddEmptySubset()

void operations_research::SetCoverModel::AddEmptySubset ( Cost cost)

Definition at line 244 of file set_cover_model.cc.

◆ all_subsets()

std::vector< SubsetIndex > operations_research::SetCoverModel::all_subsets ( ) const
inline

Definition at line 193 of file set_cover_model.h.

◆ columns()

const SparseColumnView & operations_research::SetCoverModel::columns ( ) const
inline

Definition at line 171 of file set_cover_model.h.

◆ compute_sparse_row_view_using_slices_duration()

absl::Duration operations_research::SetCoverModel::compute_sparse_row_view_using_slices_duration ( ) const
inline

Definition at line 202 of file set_cover_model.h.

◆ ComputeColumnDeciles()

std::vector< int64_t > operations_research::SetCoverModel::ComputeColumnDeciles ( ) const

Definition at line 718 of file set_cover_model.cc.

◆ ComputeColumnDeltaSizeStats()

SetCoverModel::Stats operations_research::SetCoverModel::ComputeColumnDeltaSizeStats ( ) const

Definition at line 734 of file set_cover_model.cc.

◆ ComputeColumnStats()

SetCoverModel::Stats operations_research::SetCoverModel::ComputeColumnStats ( ) const

Definition at line 688 of file set_cover_model.cc.

◆ ComputeCostStats()

SetCoverModel::Stats operations_research::SetCoverModel::ComputeCostStats ( ) const

Definition at line 672 of file set_cover_model.cc.

◆ ComputeFeasibility()

bool operations_research::SetCoverModel::ComputeFeasibility ( )

Definition at line 472 of file set_cover_model.cc.

◆ ComputeNumSingletonColumns()

BaseInt operations_research::SetCoverModel::ComputeNumSingletonColumns ( ) const
inline

Definition at line 128 of file set_cover_model.h.

◆ ComputeNumSingletonRows()

BaseInt operations_research::SetCoverModel::ComputeNumSingletonRows ( ) const
inline

Definition at line 140 of file set_cover_model.h.

◆ ComputeRowDeciles()

std::vector< int64_t > operations_research::SetCoverModel::ComputeRowDeciles ( ) const

Definition at line 708 of file set_cover_model.cc.

◆ ComputeRowDeltaSizeStats()

SetCoverModel::Stats operations_research::SetCoverModel::ComputeRowDeltaSizeStats ( ) const

Definition at line 747 of file set_cover_model.cc.

◆ ComputeRowStats()

SetCoverModel::Stats operations_research::SetCoverModel::ComputeRowStats ( ) const

Definition at line 678 of file set_cover_model.cc.

◆ ComputeSliceIndices()

std::vector< SubsetIndex > operations_research::SetCoverModel::ComputeSliceIndices ( int num_partitions)

Definition at line 372 of file set_cover_model.cc.

◆ ComputeSparseRowViewSlice()

SparseRowView operations_research::SetCoverModel::ComputeSparseRowViewSlice ( SubsetIndex begin_subset,
SubsetIndex end_subset )

Definition at line 401 of file set_cover_model.cc.

◆ ComputeSparseRowViewUsingSlices()

SparseRowView operations_research::SetCoverModel::ComputeSparseRowViewUsingSlices ( )

Definition at line 459 of file set_cover_model.cc.

◆ create_sparse_row_view_duration()

absl::Duration operations_research::SetCoverModel::create_sparse_row_view_duration ( ) const
inline

Definition at line 198 of file set_cover_model.h.

◆ CreateSparseRowView()

void operations_research::SetCoverModel::CreateSparseRowView ( )

Definition at line 337 of file set_cover_model.cc.

◆ CutSparseRowViewInSlices()

std::vector< SparseRowView > operations_research::SetCoverModel::CutSparseRowViewInSlices ( absl::Span< const SubsetIndex > partition_points)

Definition at line 430 of file set_cover_model.cc.

◆ ElementRange()

util_intops::StrongIntRange< ElementIndex > operations_research::SetCoverModel::ElementRange ( ) const
inline

Definition at line 187 of file set_cover_model.h.

◆ ExportModelAsProto()

SetCoverProto operations_research::SetCoverModel::ExportModelAsProto ( ) const

Definition at line 517 of file set_cover_model.cc.

◆ FillRate()

double operations_research::SetCoverModel::FillRate ( ) const
inline

Definition at line 122 of file set_cover_model.h.

◆ GenerateRandomModelFrom()

SetCoverModel operations_research::SetCoverModel::GenerateRandomModelFrom ( const SetCoverModel & seed_model,
BaseInt num_elements,
BaseInt num_subsets,
double row_scale,
double column_scale,
double cost_scale )
static

Definition at line 90 of file set_cover_model.cc.

◆ generation_duration()

absl::Duration operations_research::SetCoverModel::generation_duration ( ) const
inline

Definition at line 196 of file set_cover_model.h.

◆ ImportModelFromProto()

void operations_research::SetCoverModel::ImportModelFromProto ( const SetCoverProto & message)

Definition at line 537 of file set_cover_model.cc.

◆ is_unicost()

bool operations_research::SetCoverModel::is_unicost ( )
inline

Definition at line 155 of file set_cover_model.h.

◆ IsEmpty()

bool operations_research::SetCoverModel::IsEmpty ( ) const
inline

Definition at line 105 of file set_cover_model.h.

◆ name()

std::string operations_research::SetCoverModel::name ( ) const
inline

Definition at line 75 of file set_cover_model.h.

◆ num_elements()

BaseInt operations_research::SetCoverModel::num_elements ( ) const
inline

Definition at line 109 of file set_cover_model.h.

◆ num_nonzeros()

int64_t operations_research::SetCoverModel::num_nonzeros ( ) const
inline

Definition at line 119 of file set_cover_model.h.

◆ num_subsets()

BaseInt operations_research::SetCoverModel::num_subsets ( ) const
inline

Definition at line 113 of file set_cover_model.h.

◆ ReduceSparseRowViewSlices()

SparseRowView operations_research::SetCoverModel::ReduceSparseRowViewSlices ( absl::Span< const SparseRowView > row_slices)

Definition at line 443 of file set_cover_model.cc.

◆ ReserveNumElementsInSubset()

void operations_research::SetCoverModel::ReserveNumElementsInSubset ( BaseInt num_elements,
BaseInt subset )

Definition at line 322 of file set_cover_model.cc.

◆ ResizeNumSubsets() [1/2]

void operations_research::SetCoverModel::ResizeNumSubsets ( BaseInt num_subsets)

Definition at line 311 of file set_cover_model.cc.

◆ ResizeNumSubsets() [2/2]

void operations_research::SetCoverModel::ResizeNumSubsets ( SubsetIndex num_subsets)

Definition at line 318 of file set_cover_model.cc.

◆ row_view_is_valid()

bool operations_research::SetCoverModel::row_view_is_valid ( ) const
inline

Definition at line 180 of file set_cover_model.h.

◆ rows()

const SparseRowView & operations_research::SetCoverModel::rows ( ) const
inline

Definition at line 174 of file set_cover_model.h.

◆ SetName()

void operations_research::SetCoverModel::SetName ( const absl::string_view name)
inline

Definition at line 77 of file set_cover_model.h.

◆ SetSubsetCost() [1/2]

void operations_research::SetCoverModel::SetSubsetCost ( BaseInt subset,
Cost cost )

Definition at line 271 of file set_cover_model.cc.

◆ SetSubsetCost() [2/2]

void operations_research::SetCoverModel::SetSubsetCost ( SubsetIndex subset,
Cost cost )

Definition at line 288 of file set_cover_model.cc.

◆ SortElementsInSubsets()

void operations_research::SetCoverModel::SortElementsInSubsets ( )

Definition at line 328 of file set_cover_model.cc.

◆ subset_costs()

const SubsetCostVector & operations_research::SetCoverModel::subset_costs ( ) const
inline

Definition at line 151 of file set_cover_model.h.

◆ SubsetRange()

util_intops::StrongIntRange< SubsetIndex > operations_research::SetCoverModel::SubsetRange ( ) const
inline

Definition at line 183 of file set_cover_model.h.

◆ ToString()

std::string operations_research::SetCoverModel::ToString ( absl::string_view sep) const

Definition at line 566 of file set_cover_model.cc.

◆ ToVerboseString()

std::string operations_research::SetCoverModel::ToVerboseString ( absl::string_view sep) const

Definition at line 558 of file set_cover_model.cc.


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