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

#include <attr_diff.h>

Public Types

using Key = AttrKey<n, Symmetry>

Public Member Functions

 AttrDiff ()=default
 On creation, the attribute is not modified for any key.
void Advance ()
 Clear all tracked modifications.
void SetModified (const Key key)
 Mark the attribute as modified for key.
const AttrKeyHashSet< Key > & modified_keys () const
bool has_modified_keys () const
void Erase (const Key key)

Detailed Description

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

Tracks modifications to an Attribute with a key size of n (e.g., variable lower bound has a key size of 1).

Definition at line 28 of file attr_diff.h.

Member Typedef Documentation

◆ Key

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

Definition at line 30 of file attr_diff.h.

Constructor & Destructor Documentation

◆ AttrDiff()

template<int n, typename Symmetry>
operations_research::math_opt::AttrDiff< n, Symmetry >::AttrDiff ( )
default

On creation, the attribute is not modified for any key.

Member Function Documentation

◆ Advance()

template<int n, typename Symmetry>
void operations_research::math_opt::AttrDiff< n, Symmetry >::Advance ( )
inline

Clear all tracked modifications.

Definition at line 36 of file attr_diff.h.

◆ Erase()

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

Stop tracking modifications for this attribute key. (Typically invoked when an element in the key was deleted from the model.)

Definition at line 50 of file attr_diff.h.

◆ has_modified_keys()

template<int n, typename Symmetry>
bool operations_research::math_opt::AttrDiff< n, Symmetry >::has_modified_keys ( ) const
inline

Definition at line 46 of file attr_diff.h.

◆ modified_keys()

template<int n, typename Symmetry>
const AttrKeyHashSet< Key > & operations_research::math_opt::AttrDiff< n, Symmetry >::modified_keys ( ) const
inline

Returns the attribute keys that have been modified for this attribute (the elements where set_modified() was called without a subsequent call to Advance()).

Definition at line 44 of file attr_diff.h.

◆ SetModified()

template<int n, typename Symmetry>
void operations_research::math_opt::AttrDiff< n, Symmetry >::SetModified ( const Key key)
inline

Mark the attribute as modified for key.

Definition at line 39 of file attr_diff.h.


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