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

Detailed Description

template<typename T>
class operations_research::TabuList< T >

A Tabu list is a fixed-sized set with FIFO replacement. It is expected to be of small size, usually a few dozens of elements.

Definition at line 407 of file set_cover_heuristics.h.

#include <set_cover_heuristics.h>

Public Member Functions

 TabuList (T size)
int size () const
 Returns the size of the array.
void Init (int size)
 Initializes the array of the Tabu list.
void Add (T t)
 Adds t to the array. When the end of the array is reached, re-start at 0.
bool Contains (T t) const
 Returns true if t is in the array. This is O(size), but small.

Constructor & Destructor Documentation

◆ TabuList()

template<typename T>
operations_research::TabuList< T >::TabuList ( T size)
inlineexplicit

Definition at line 409 of file set_cover_heuristics.h.

Member Function Documentation

◆ Add()

template<typename T>
void operations_research::TabuList< T >::Add ( T t)
inline

Adds t to the array. When the end of the array is reached, re-start at 0.

Definition at line 424 of file set_cover_heuristics.h.

◆ Contains()

template<typename T>
bool operations_research::TabuList< T >::Contains ( T t) const
inline

Returns true if t is in the array. This is O(size), but small.

Definition at line 437 of file set_cover_heuristics.h.

◆ Init()

template<typename T>
void operations_research::TabuList< T >::Init ( int size)
inline

Initializes the array of the Tabu list.

Definition at line 417 of file set_cover_heuristics.h.

◆ size()

template<typename T>
int operations_research::TabuList< T >::size ( ) const
inline

Returns the size of the array.

Definition at line 414 of file set_cover_heuristics.h.


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