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

#include <attr_storage.h>

Public Types

using Key = AttrKey<n, NoSymmetry>

Public Member Functions

 SparseKeySet (const DenseKeySet< n > &dense_set)
size_t size () const
template<typename F>
void ForEach (F f) const
 requires std::invocable<F, const Key&>
void Erase (const Key &key)
void Insert (const Key &key)

Detailed Description

template<int n>
class operations_research::math_opt::detail::SparseKeySet< n >

A non-default key set based on a hash set. Simple, but requires a hash lookup for each insertion and deletion.

Definition at line 71 of file attr_storage.h.

Member Typedef Documentation

◆ Key

{Dense,Sparse}KeySet stores symmetric keys, symmetry is handled by SlicingStorage.

Definition at line 75 of file attr_storage.h.

Constructor & Destructor Documentation

◆ SparseKeySet()

template<int n>
operations_research::math_opt::detail::SparseKeySet< n >::SparseKeySet ( const DenseKeySet< n > & dense_set)
inlineexplicit

Definition at line 77 of file attr_storage.h.

Member Function Documentation

◆ Erase()

template<int n>
void operations_research::math_opt::detail::SparseKeySet< n >::Erase ( const Key & key)
inline

Definition at line 90 of file attr_storage.h.

◆ ForEach()

template<int n>
template<typename F>
void operations_research::math_opt::detail::SparseKeySet< n >::ForEach ( F f) const
inline

requires std::invocable<F, const Key&>

Definition at line 84 of file attr_storage.h.

◆ Insert()

template<int n>
void operations_research::math_opt::detail::SparseKeySet< n >::Insert ( const Key & key)
inline

Definition at line 91 of file attr_storage.h.

◆ size()

template<int n>
size_t operations_research::math_opt::detail::SparseKeySet< n >::size ( ) const
inline

Definition at line 80 of file attr_storage.h.


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