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

Detailed Description

Definition at line 50 of file model_summary.h.

#include <model_summary.h>

Public Member Functions

 IdNameBiMap (bool check_names=true)
 IdNameBiMap (const IdNameBiMap &other)
IdNameBiMapoperator= (const IdNameBiMap &other)
 IdNameBiMap (IdNameBiMap &&other)=default
IdNameBiMapoperator= (IdNameBiMap &&other)=default
 IdNameBiMap (std::initializer_list< std::pair< int64_t, absl::string_view > > ids)
absl::Status Insert (int64_t id, std::string name)
absl::Status Erase (int64_t id)
bool HasId (int64_t id) const
bool HasName (absl::string_view name) const
bool Empty () const
int Size () const
int64_t next_free_id () const
absl::Status SetNextFreeId (int64_t new_next_free_id)
const gtl::linked_hash_map< int64_t, std::string > & id_to_name () const
const std::optional< absl::flat_hash_map< absl::string_view, int64_t > > & nonempty_name_to_id () const
absl::Status BulkUpdate (absl::Span< const int64_t > deleted_ids, absl::Span< const int64_t > new_ids, absl::Span< const std::string *const > names)

Constructor & Destructor Documentation

◆ IdNameBiMap() [1/4]

operations_research::math_opt::IdNameBiMap::IdNameBiMap ( bool check_names = true)
inlineexplicit

Definition at line 54 of file model_summary.h.

◆ IdNameBiMap() [2/4]

operations_research::math_opt::IdNameBiMap::IdNameBiMap ( const IdNameBiMap & other)

Definition at line 70 of file model_summary.cc.

◆ IdNameBiMap() [3/4]

operations_research::math_opt::IdNameBiMap::IdNameBiMap ( IdNameBiMap && other)
default

◆ IdNameBiMap() [4/4]

operations_research::math_opt::IdNameBiMap::IdNameBiMap ( std::initializer_list< std::pair< int64_t, absl::string_view > > ids)

Definition at line 62 of file model_summary.cc.

Member Function Documentation

◆ BulkUpdate()

absl::Status operations_research::math_opt::IdNameBiMap::BulkUpdate ( absl::Span< const int64_t > deleted_ids,
absl::Span< const int64_t > new_ids,
absl::Span< const std::string *const > names )

Definition at line 95 of file model_summary.cc.

◆ Empty()

bool operations_research::math_opt::IdNameBiMap::Empty ( ) const
inline

Definition at line 209 of file model_summary.h.

◆ Erase()

absl::Status operations_research::math_opt::IdNameBiMap::Erase ( int64_t id)
inline

Definition at line 179 of file model_summary.h.

◆ HasId()

bool operations_research::math_opt::IdNameBiMap::HasId ( int64_t id) const
inline

Definition at line 196 of file model_summary.h.

◆ HasName()

bool operations_research::math_opt::IdNameBiMap::HasName ( absl::string_view name) const
inline

Definition at line 199 of file model_summary.h.

◆ id_to_name()

const gtl::linked_hash_map< int64_t, std::string > & operations_research::math_opt::IdNameBiMap::id_to_name ( ) const
inline

Definition at line 102 of file model_summary.h.

◆ Insert()

absl::Status operations_research::math_opt::IdNameBiMap::Insert ( int64_t id,
std::string name )
inline

Definition at line 152 of file model_summary.h.

◆ next_free_id()

int64_t operations_research::math_opt::IdNameBiMap::next_free_id ( ) const
inline

Definition at line 213 of file model_summary.h.

◆ nonempty_name_to_id()

const std::optional< absl::flat_hash_map< absl::string_view, int64_t > > & operations_research::math_opt::IdNameBiMap::nonempty_name_to_id ( ) const
inline

Definition at line 108 of file model_summary.h.

◆ operator=() [1/2]

IdNameBiMap & operations_research::math_opt::IdNameBiMap::operator= ( const IdNameBiMap & other)

Definition at line 72 of file model_summary.cc.

◆ operator=() [2/2]

IdNameBiMap & operations_research::math_opt::IdNameBiMap::operator= ( IdNameBiMap && other)
default

◆ SetNextFreeId()

absl::Status operations_research::math_opt::IdNameBiMap::SetNextFreeId ( int64_t new_next_free_id)
inline

Definition at line 215 of file model_summary.h.

◆ Size()

int operations_research::math_opt::IdNameBiMap::Size ( ) const
inline

Definition at line 211 of file model_summary.h.


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