Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6001129
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T00:47:30+00:00 2026-05-23T00:47:30+00:00

short question: Is there a way to implement a efficient decreaseKey method for SplMinHeap

  • 0

short question:

Is there a way to implement a
efficient
decreaseKey
method for
SplMinHeap
(or any of the spl heaps) without
loosing the performance bonus?

Background:

For a private project I’m playing around with implementing a A* class and hoped to get a performance increase by using one of the spl heap structures. But I can’t get my head around on how to use these as they all lack decreaseKey or contains methods. Maybe I’m missing something completely?

Thanks a lot!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T00:47:30+00:00Added an answer on May 23, 2026 at 12:47 am

    To implement the decreaseKey method, we need to:

    1. Find the entry in the heap and decrement its key by one.
    2. Perform up-heap bubbling until the heap-order property is fully restored.

    Unless we need the entry with the smallest key, we don’t know where the entries are stored at all. Furthermore, even if we find the requested entry in an acceptable time, we just can’t update its key, regarding the methods of SplMinHeap.

    So I don’t see an efficient way to implement the decreaseKey method with the SplMinHeap data structure. Maybe you should implement YourHeap with YourCompleteBinaryTree realized by means of YourArrayList, for instance.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Short question: Is there a simple way in LINQ to objects to get a
Short question: Do any of MS's built in Data Objects support INotifyPropertyChanged? Long explination:
In Java, is there any way to create an instance of any class that
I'm trying to figure out the most efficient and scalable way to implement a
This is sort of a follow-up to this question . If there are multiple
Long winded title, short question: If one wants to develop for Windows but not
I have a SVNSERVE server set up to host multiple repositories. Short question here
Short best practice question: If an object A is injected into another object B,
The short form of this question: When, if ever, is it appropriate to use
Very basic question: how do I write a short literal in C++? I know

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.