OR-Tools  9.6
IdNameBiMap

Detailed Description

Definition at line 50 of file 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]

IdNameBiMap ( bool  check_names = true)
inlineexplicit

Definition at line 54 of file model_summary.h.

◆ IdNameBiMap() [2/4]

IdNameBiMap ( const IdNameBiMap other)

Definition at line 71 of file model_summary.cc.

◆ IdNameBiMap() [3/4]

IdNameBiMap ( IdNameBiMap &&  other)
default

◆ IdNameBiMap() [4/4]

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

Definition at line 63 of file model_summary.cc.

Member Function Documentation

◆ BulkUpdate()

absl::Status 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 96 of file model_summary.cc.

◆ Empty()

bool Empty ( ) const
inline

Definition at line 207 of file model_summary.h.

◆ Erase()

absl::Status Erase ( int64_t  id)
inline

Definition at line 177 of file model_summary.h.

◆ HasId()

bool HasId ( int64_t  id) const
inline

Definition at line 194 of file model_summary.h.

◆ HasName()

bool HasName ( absl::string_view  name) const
inline

Definition at line 197 of file model_summary.h.

◆ id_to_name()

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

Definition at line 102 of file model_summary.h.

◆ Insert()

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

Definition at line 150 of file model_summary.h.

◆ next_free_id()

int64_t next_free_id ( ) const
inline

Definition at line 211 of file model_summary.h.

◆ nonempty_name_to_id()

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

Definition at line 108 of file model_summary.h.

◆ operator=() [1/2]

IdNameBiMap & operator= ( const IdNameBiMap other)

Definition at line 73 of file model_summary.cc.

◆ operator=() [2/2]

IdNameBiMap& operator= ( IdNameBiMap &&  other)
default

◆ SetNextFreeId()

absl::Status SetNextFreeId ( int64_t  new_next_free_id)
inline

Definition at line 213 of file model_summary.h.

◆ Size()

int Size ( ) const
inline

Definition at line 209 of file model_summary.h.


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