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

#include <element_storage.h>

Public Member Functions

int64_t Add (const absl::string_view name)
bool exists (const int64_t id) const
absl::StatusOr< absl::string_view > GetName (const int64_t id) const
int64_t next_id () const
std::vector< int64_t > AllIds () const
int64_t size () const

Friends

class SparseElementStorage

Detailed Description

A dense element storage, for use when no elements have been erased. Same API as ElementStorage, but no deletion.

Todo
(b/369972336): We should stay in dense mode if we have a small percentage of deletions.

Definition at line 37 of file element_storage.h.

Member Function Documentation

◆ Add()

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

Definition at line 39 of file element_storage.h.

◆ AllIds()

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

Definition at line 36 of file element_storage.cc.

◆ exists()

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

Definition at line 45 of file element_storage.h.

◆ GetName()

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

Definition at line 49 of file element_storage.h.

◆ next_id()

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

Definition at line 56 of file element_storage.h.

◆ size()

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

Definition at line 60 of file element_storage.h.

◆ SparseElementStorage

friend class SparseElementStorage
friend

Definition at line 63 of file element_storage.h.


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