Google OR-Tools v9.15
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
operations_research::math_opt::AttrStorage< V, n, Symmetry > Class Template Reference

Detailed Description

template<typename V, int n, typename Symmetry>
class operations_research::math_opt::AttrStorage< V, n, Symmetry >

Definition at line 299 of file attr_storage.h.

#include <attr_storage.h>

Public Types

using Key = AttrKey<n, Symmetry>

Public Member Functions

 AttrStorage ()
 AttrStorage (const V default_value)
 AttrStorage (const AttrStorage &)=default
AttrStorageoperator= (const AttrStorage &)=default
 AttrStorage (AttrStorage &&)=default
AttrStorageoperator= (AttrStorage &&)=default
bool IsNonDefault (const Key key) const
std::optional< V > Set (const Key key, const V value)
Get (const Key key) const
std::optional< V > GetIfNonDefault (const Key key) const
void Erase (const Key key)
std::vector< KeyNonDefaults () const
template<int i>
std::vector< KeySlice (const int64_t key_elem) const
template<int i>
int64_t GetSliceSize (const int64_t key_elem) const
int64_t num_non_defaults () const
void Clear ()

Member Typedef Documentation

◆ Key

template<typename V, int n, typename Symmetry>
using operations_research::math_opt::AttrStorage< V, n, Symmetry >::Key = AttrKey<n, Symmetry>

Definition at line 301 of file attr_storage.h.

Constructor & Destructor Documentation

◆ AttrStorage() [1/4]

template<typename V, int n, typename Symmetry>
operations_research::math_opt::AttrStorage< V, n, Symmetry >::AttrStorage ( )
inlineexplicit

Definition at line 307 of file attr_storage.h.

◆ AttrStorage() [2/4]

template<typename V, int n, typename Symmetry>
operations_research::math_opt::AttrStorage< V, n, Symmetry >::AttrStorage ( const V default_value)
inlineexplicit

Definition at line 311 of file attr_storage.h.

◆ AttrStorage() [3/4]

template<typename V, int n, typename Symmetry>
operations_research::math_opt::AttrStorage< V, n, Symmetry >::AttrStorage ( const AttrStorage< V, n, Symmetry > & )
default

◆ AttrStorage() [4/4]

template<typename V, int n, typename Symmetry>
operations_research::math_opt::AttrStorage< V, n, Symmetry >::AttrStorage ( AttrStorage< V, n, Symmetry > && )
default

Member Function Documentation

◆ Clear()

template<typename V, int n, typename Symmetry>
void operations_research::math_opt::AttrStorage< V, n, Symmetry >::Clear ( )
inline

Definition at line 416 of file attr_storage.h.

◆ Erase()

template<typename V, int n, typename Symmetry>
void operations_research::math_opt::AttrStorage< V, n, Symmetry >::Erase ( const Key key)
inline

Definition at line 366 of file attr_storage.h.

◆ Get()

template<typename V, int n, typename Symmetry>
V operations_research::math_opt::AttrStorage< V, n, Symmetry >::Get ( const Key key) const
inline

Definition at line 352 of file attr_storage.h.

◆ GetIfNonDefault()

template<typename V, int n, typename Symmetry>
std::optional< V > operations_research::math_opt::AttrStorage< V, n, Symmetry >::GetIfNonDefault ( const Key key) const
inline

Definition at line 357 of file attr_storage.h.

◆ GetSliceSize()

template<typename V, int n, typename Symmetry>
template<int i>
int64_t operations_research::math_opt::AttrStorage< V, n, Symmetry >::GetSliceSize ( const int64_t key_elem) const
inline

Definition at line 402 of file attr_storage.h.

◆ IsNonDefault()

template<typename V, int n, typename Symmetry>
bool operations_research::math_opt::AttrStorage< V, n, Symmetry >::IsNonDefault ( const Key key) const
inline

Definition at line 320 of file attr_storage.h.

◆ NonDefaults()

template<typename V, int n, typename Symmetry>
std::vector< Key > operations_research::math_opt::AttrStorage< V, n, Symmetry >::NonDefaults ( ) const
inline

Definition at line 374 of file attr_storage.h.

◆ num_non_defaults()

template<typename V, int n, typename Symmetry>
int64_t operations_research::math_opt::AttrStorage< V, n, Symmetry >::num_non_defaults ( ) const
inline

Definition at line 413 of file attr_storage.h.

◆ operator=() [1/2]

template<typename V, int n, typename Symmetry>
AttrStorage & operations_research::math_opt::AttrStorage< V, n, Symmetry >::operator= ( AttrStorage< V, n, Symmetry > && )
default

◆ operator=() [2/2]

template<typename V, int n, typename Symmetry>
AttrStorage & operations_research::math_opt::AttrStorage< V, n, Symmetry >::operator= ( const AttrStorage< V, n, Symmetry > & )
default

◆ Set()

template<typename V, int n, typename Symmetry>
std::optional< V > operations_research::math_opt::AttrStorage< V, n, Symmetry >::Set ( const Key key,
const V value )
inline

Definition at line 326 of file attr_storage.h.

◆ Slice()

template<typename V, int n, typename Symmetry>
template<int i>
std::vector< Key > operations_research::math_opt::AttrStorage< V, n, Symmetry >::Slice ( const int64_t key_elem) const
inline

Definition at line 388 of file attr_storage.h.


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