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

A sparse element storage, which supports deletion. More...

#include <element_storage.h>

Public Member Functions

 SparseElementStorage (DenseElementStorage &&dense)
int64_t Add (const absl::string_view name)
bool Erase (int64_t id)
bool exists (int64_t id) const
absl::StatusOr< absl::string_view > GetName (int64_t id) const
int64_t next_id () const
std::vector< int64_t > AllIds () const
int64_t size () const
void ensure_next_id_at_least (int64_t id)

Detailed Description

A sparse element storage, which supports deletion.

Definition at line 68 of file element_storage.h.

Constructor & Destructor Documentation

◆ SparseElementStorage()

operations_research::math_opt::detail::SparseElementStorage::SparseElementStorage ( DenseElementStorage && dense)
explicit

Definition at line 42 of file element_storage.cc.

Member Function Documentation

◆ Add()

int64_t operations_research::math_opt::detail::SparseElementStorage::Add ( const absl::string_view name)
inline

Definition at line 72 of file element_storage.h.

◆ AllIds()

std::vector< int64_t > operations_research::math_opt::detail::SparseElementStorage::AllIds ( ) const

Definition at line 27 of file element_storage.cc.

◆ ensure_next_id_at_least()

void operations_research::math_opt::detail::SparseElementStorage::ensure_next_id_at_least ( int64_t id)
inline

Definition at line 96 of file element_storage.h.

◆ Erase()

bool operations_research::math_opt::detail::SparseElementStorage::Erase ( int64_t id)
inline

Definition at line 79 of file element_storage.h.

◆ exists()

bool operations_research::math_opt::detail::SparseElementStorage::exists ( int64_t id) const
inline

Definition at line 81 of file element_storage.h.

◆ GetName()

absl::StatusOr< absl::string_view > operations_research::math_opt::detail::SparseElementStorage::GetName ( int64_t id) const
inline

Definition at line 83 of file element_storage.h.

◆ next_id()

int64_t operations_research::math_opt::detail::SparseElementStorage::next_id ( ) const
inline

Definition at line 90 of file element_storage.h.

◆ size()

int64_t operations_research::math_opt::detail::SparseElementStorage::size ( ) const
inline

Definition at line 94 of file element_storage.h.


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