10 #ifndef IFPACK2_HEAP_HPP
11 #define IFPACK2_HEAP_HPP
19 template<
typename Scalar,
typename Ordinal>
20 struct greater_indirect {
25 bool operator()(
const Ordinal& lhs,
const Ordinal& rhs)
const
36 template<
typename Ordinal,
typename SizeType>
40 else heap[heap_len] = idx;
42 std::push_heap(heap.
begin(), heap.
begin()+heap_len, std::greater<Ordinal>());
48 template<
typename Ordinal,
typename SizeType,
class Compare>
52 else heap[heap_len] = idx;
54 std::push_heap(heap.
begin(), heap.
begin()+heap_len, comp);
58 template<
typename Ordinal,
typename SizeType>
61 std::pop_heap(heap.
begin(), heap.
begin()+heap_len, std::greater<Ordinal>());
68 template<
typename Ordinal,
typename SizeType,
class Compare>
71 std::pop_heap(heap.
begin(), heap.
begin()+heap_len, comp);
void rm_heap_root(Teuchos::Array< Ordinal > &heap, SizeType &heap_len)
Definition: Ifpack2_Heap.hpp:59
static magnitudeType magnitude(T a)
void push_back(const value_type &x)
void add_to_heap(const Ordinal &idx, Teuchos::Array< Ordinal > &heap, SizeType &heap_len)
Definition: Ifpack2_Heap.hpp:37