43 #ifndef IFPACK2_HEAP_HPP
44 #define IFPACK2_HEAP_HPP
52 template<
typename Scalar,
typename Ordinal>
53 struct greater_indirect {
58 bool operator()(
const Ordinal& lhs,
const Ordinal& rhs)
const
69 template<
typename Ordinal,
typename SizeType>
73 else heap[heap_len] = idx;
75 std::push_heap(heap.
begin(), heap.
begin()+heap_len, std::greater<Ordinal>());
81 template<
typename Ordinal,
typename SizeType,
class Compare>
85 else heap[heap_len] = idx;
87 std::push_heap(heap.
begin(), heap.
begin()+heap_len, comp);
91 template<
typename Ordinal,
typename SizeType>
94 std::pop_heap(heap.
begin(), heap.
begin()+heap_len, std::greater<Ordinal>());
101 template<
typename Ordinal,
typename SizeType,
class Compare>
104 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:92
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:70