Google OR-Tools v9.15
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
AdjustableKAryHeap< Priority, Index, Arity, IsMaxHeap > Class Template Reference

Detailed Description

template<typename Priority, typename Index, int Arity, bool IsMaxHeap>
class AdjustableKAryHeap< Priority, Index, Arity, IsMaxHeap >

Definition at line 43 of file adjustable_k_ary_heap.h.

#include <adjustable_k_ary_heap.h>

Public Types

using Aggregate = std::pair<Priority, Index>
using HeapIndex = Index

Public Member Functions

 AdjustableKAryHeap ()
 AdjustableKAryHeap (const std::vector< Aggregate > &elements, HeapIndex universe_size)
 AdjustableKAryHeap (const std::vector< Index > &indices, const std::vector< Priority > &priorities, HeapIndex universe_size)
void Clear ()
void Load (const std::vector< Aggregate > &elements, HeapIndex universe_size)
void Load (const std::vector< Index > &indices, const std::vector< Priority > &priorities, HeapIndex universe_size)
void Pop ()
Index TopIndex () const
Priority TopPriority () const
HeapIndex heap_size () const
bool IsEmpty () const
void Insert (Aggregate element)
bool Remove (Index index)
void Update (Aggregate element)
bool Contains (Index index) const
bool CheckHeapProperty () const

Member Typedef Documentation

◆ Aggregate

template<typename Priority, typename Index, int Arity, bool IsMaxHeap>
using AdjustableKAryHeap< Priority, Index, Arity, IsMaxHeap >::Aggregate = std::pair<Priority, Index>

Definition at line 45 of file adjustable_k_ary_heap.h.

◆ HeapIndex

template<typename Priority, typename Index, int Arity, bool IsMaxHeap>
using AdjustableKAryHeap< Priority, Index, Arity, IsMaxHeap >::HeapIndex = Index

Definition at line 46 of file adjustable_k_ary_heap.h.

Constructor & Destructor Documentation

◆ AdjustableKAryHeap() [1/3]

template<typename Priority, typename Index, int Arity, bool IsMaxHeap>
AdjustableKAryHeap< Priority, Index, Arity, IsMaxHeap >::AdjustableKAryHeap ( )
inline

Definition at line 52 of file adjustable_k_ary_heap.h.

◆ AdjustableKAryHeap() [2/3]

template<typename Priority, typename Index, int Arity, bool IsMaxHeap>
AdjustableKAryHeap< Priority, Index, Arity, IsMaxHeap >::AdjustableKAryHeap ( const std::vector< Aggregate > & elements,
HeapIndex universe_size )
inlineexplicit

Definition at line 56 of file adjustable_k_ary_heap.h.

◆ AdjustableKAryHeap() [3/3]

template<typename Priority, typename Index, int Arity, bool IsMaxHeap>
AdjustableKAryHeap< Priority, Index, Arity, IsMaxHeap >::AdjustableKAryHeap ( const std::vector< Index > & indices,
const std::vector< Priority > & priorities,
HeapIndex universe_size )
inlineexplicit

Definition at line 61 of file adjustable_k_ary_heap.h.

Member Function Documentation

◆ CheckHeapProperty()

template<typename Priority, typename Index, int Arity, bool IsMaxHeap>
bool AdjustableKAryHeap< Priority, Index, Arity, IsMaxHeap >::CheckHeapProperty ( ) const
inline

Definition at line 174 of file adjustable_k_ary_heap.h.

◆ Clear()

template<typename Priority, typename Index, int Arity, bool IsMaxHeap>
void AdjustableKAryHeap< Priority, Index, Arity, IsMaxHeap >::Clear ( )
inline

Definition at line 67 of file adjustable_k_ary_heap.h.

◆ Contains()

template<typename Priority, typename Index, int Arity, bool IsMaxHeap>
bool AdjustableKAryHeap< Priority, Index, Arity, IsMaxHeap >::Contains ( Index index) const
inline

Definition at line 169 of file adjustable_k_ary_heap.h.

◆ heap_size()

template<typename Priority, typename Index, int Arity, bool IsMaxHeap>
HeapIndex AdjustableKAryHeap< Priority, Index, Arity, IsMaxHeap >::heap_size ( ) const
inline

Definition at line 122 of file adjustable_k_ary_heap.h.

◆ Insert()

template<typename Priority, typename Index, int Arity, bool IsMaxHeap>
void AdjustableKAryHeap< Priority, Index, Arity, IsMaxHeap >::Insert ( Aggregate element)
inline

Definition at line 128 of file adjustable_k_ary_heap.h.

◆ IsEmpty()

template<typename Priority, typename Index, int Arity, bool IsMaxHeap>
bool AdjustableKAryHeap< Priority, Index, Arity, IsMaxHeap >::IsEmpty ( ) const
inline

Definition at line 125 of file adjustable_k_ary_heap.h.

◆ Load() [1/2]

template<typename Priority, typename Index, int Arity, bool IsMaxHeap>
void AdjustableKAryHeap< Priority, Index, Arity, IsMaxHeap >::Load ( const std::vector< Aggregate > & elements,
HeapIndex universe_size )
inline

Definition at line 73 of file adjustable_k_ary_heap.h.

◆ Load() [2/2]

template<typename Priority, typename Index, int Arity, bool IsMaxHeap>
void AdjustableKAryHeap< Priority, Index, Arity, IsMaxHeap >::Load ( const std::vector< Index > & indices,
const std::vector< Priority > & priorities,
HeapIndex universe_size )
inline

Definition at line 84 of file adjustable_k_ary_heap.h.

◆ Pop()

template<typename Priority, typename Index, int Arity, bool IsMaxHeap>
void AdjustableKAryHeap< Priority, Index, Arity, IsMaxHeap >::Pop ( )
inline

Definition at line 99 of file adjustable_k_ary_heap.h.

◆ Remove()

template<typename Priority, typename Index, int Arity, bool IsMaxHeap>
bool AdjustableKAryHeap< Priority, Index, Arity, IsMaxHeap >::Remove ( Index index)
inline

Definition at line 147 of file adjustable_k_ary_heap.h.

◆ TopIndex()

template<typename Priority, typename Index, int Arity, bool IsMaxHeap>
Index AdjustableKAryHeap< Priority, Index, Arity, IsMaxHeap >::TopIndex ( ) const
inline

Definition at line 107 of file adjustable_k_ary_heap.h.

◆ TopPriority()

template<typename Priority, typename Index, int Arity, bool IsMaxHeap>
Priority AdjustableKAryHeap< Priority, Index, Arity, IsMaxHeap >::TopPriority ( ) const
inline

Definition at line 116 of file adjustable_k_ary_heap.h.

◆ Update()

template<typename Priority, typename Index, int Arity, bool IsMaxHeap>
void AdjustableKAryHeap< Priority, Index, Arity, IsMaxHeap >::Update ( Aggregate element)
inline

Definition at line 155 of file adjustable_k_ary_heap.h.


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