• op is an optional binary predicate to be used as the sorting criterion:
op(elem1,elem2)
• The caller has to ensure that, on entry, the elements in the range [beg,end-1) are a heap (according
to the same sorting criterion) and that the new element immediately follows these elements.
• Complexity: logarithmic (at most, log(numElems) comparisons).
Void
pop_heap (RandomAccessIterator beg, RandomAccessIterator end)
void
pop_heap (RandomAccessIterator beg, RandomAccessIterator end,
BinaryPredicate op)
• Both forms move the highest element of the heap [beg,end), which is the first element, to the last
position and create a new heap from the remaining elements in the range [beg,end-1).
• op is an optional binary predicate to be used as the sorting criterion:
op(elem1,elem2)
• The caller has to ensure that, on entry, the elements in the range [beg,end) are a heap (according
to the same sorting criterion).
• Complexity: logarithmic (at most, 2*log(numElems) comparisons).
void
sort_heap (RandomAccessIterator beg, RandomAccessIterator end)
void
sort_heap (RandomAccessIterator beg, RandomAccessIterator end,
BinaryPredicate op)
• op เป็นเพรดิเคตไบนารีตัวเลือกที่จะใช้เป็นเงื่อนไขการเรียงลำดับ:
op (elem1, elem2)
•มีผู้เรียกเพื่อให้แน่ใจว่า ในรายการ องค์ประกอบในช่วง [วอน สิ้นสุด-1) เป็นกอง (ตาม
กับเงื่อนไขการเรียงลำดับเดียวกัน) และที่องค์ประกอบใหม่ทันทีตามองค์ประกอบเหล่านี้
•ความซับซ้อน: ลอการิทึม (ที่เปรียบเทียบมากที่สุด log(numElems))
โมฆะ
pop_heap (RandomAccessIterator วอน, RandomAccessIterator จบ)
โมฆะ
pop_heap (RandomAccessIterator วอน สิ้นสุด RandomAccessIterator,
BinaryPredicate op)
•รูปแบบย้ายองค์ประกอบสูงสุดของกอง [วอน end), ซึ่งเป็นองค์ประกอบแรก สุดท้าย
ตำแหน่ง และสร้างกองใหม่จากองค์ประกอบที่เหลือในช่วง [beg,end-1)
• op เป็นเพรดิเคตไบนารีตัวเลือกใช้เป็น criterion:
op(elem1,elem2) เรียง
•มีผู้เรียกเพื่อให้แน่ใจว่า ในรายการ องค์ประกอบในช่วง [beg,end) จะเป็นกอง (ตาม
กับเงื่อนไขการเรียงลำดับเดียวกัน)
•ความซับซ้อน: ลอการิทึม (ที่เปรียบเทียบมากที่สุด 2*log(numElems))
โมฆะ
sort_heap (RandomAccessIterator วอน สิ้นสุด RandomAccessIterator)
โมฆะ
sort_heap (RandomAccessIterator วอน สิ้นสุด RandomAccessIterator,
BinaryPredicate op)
การแปล กรุณารอสักครู่..
• op is an optional binary predicate to be used as the sorting criterion:
op(elem1,elem2)
• The caller has to ensure that, on entry, the elements in the range [beg,end-1) are a heap (according
to the same sorting criterion) and that the new element immediately follows these elements.
• Complexity: logarithmic (at most, log(numElems) comparisons).
Void
pop_heap (RandomAccessIterator beg, RandomAccessIterator end)
void
pop_heap (RandomAccessIterator beg, RandomAccessIterator end,
BinaryPredicate op)
• Both forms move the highest element of the heap [beg,end), which is the first element, to the last
position and create a new heap from the remaining elements in the range [beg,end-1).
• op is an optional binary predicate to be used as the sorting criterion:
op(elem1,elem2)
• The caller has to ensure that, on entry, the elements in the range [beg,end) are a heap (according
to the same sorting criterion).
• Complexity: logarithmic (at most, 2*log(numElems) comparisons).
void
sort_heap (RandomAccessIterator beg, RandomAccessIterator end)
void
sort_heap (RandomAccessIterator beg, RandomAccessIterator end,
BinaryPredicate op)
การแปล กรุณารอสักครู่..