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

#include <attr_storage.h>

Public Types

using Key = AttrKey<n, NoSymmetry>

Public Member Functions

 DenseKeySet ()=default
size_t size () const
template<typename F>
void ForEach (F f) const
 requires std::invocable<F, const Key&>
void Insert (const Key &key)
auto begin () const
auto end () const

Detailed Description

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

A non-default key set based on a vector. This is very efficient for insertions, reads, and slicing, but does not support deletions.

Definition at line 38 of file attr_storage.h.

Member Typedef Documentation

◆ Key

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

Definition at line 42 of file attr_storage.h.

Constructor & Destructor Documentation

◆ DenseKeySet()

template<int n>
operations_research::math_opt::detail::DenseKeySet< n >::DenseKeySet ( )
default

Member Function Documentation

◆ begin()

template<int n>
auto operations_research::math_opt::detail::DenseKeySet< n >::begin ( ) const
inline

Definition at line 61 of file attr_storage.h.

◆ end()

template<int n>
auto operations_research::math_opt::detail::DenseKeySet< n >::end ( ) const
inline

Definition at line 62 of file attr_storage.h.

◆ ForEach()

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

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

Definition at line 50 of file attr_storage.h.

◆ Insert()

template<int n>
void operations_research::math_opt::detail::DenseKeySet< n >::Insert ( const Key & key)
inline
Note
this does not check for duplicates. This is fine because inserting into this map is gated on inserting into the AttrStorage, which does check for duplicates.

Definition at line 59 of file attr_storage.h.

◆ size()

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

Definition at line 46 of file attr_storage.h.


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