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

  • SEARCH
  • Home
  • 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 8571231
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T18:44:19+00:00 2026-06-11T18:44:19+00:00

I am running an astar algorithm on a graph that is partially (?) implicit

  • 0

I am running an astar algorithm on a graph that is partially (?) implicit – it is built from a large paging data source, but the graph is persistent. I need to handle paging in new parts of the graph whenever the astar algorithm gets to an area that is not fully paged in – ideally without starting the astar search over entirely.

I have tried a couple solutions but hit some road blocks, and I’m wondering if I’m missing something obvious or just approaching the problem wrong.

I am currently using boost 1.45 but plan to upgrade to 1.51.

First, I tried to modify the astar visitor such that when it determines it needs to page in new data, it calls a function on the graph and loads it in – however, since the graph is const, this is not possible. I have looked around and found this other question boost implicit graph and astar_search_no_init that references a presentation that suggests someone has done the work to make this possible, but it looks like the actual code is not available.

Second, I thought I might be able to exit the algorithm when I get to a place where I need to page in more data, and save the state of the distance_map, predecessor_map, and color_map so that I could use them to “resume” the search using astar_search_no_init. I am not sure whether this would work, because once I switch over to using astar_search_no_init, I see that while the visitor appears to do the work of pathfinding, the predecessor map is empty – since I am using the predecessor for building the path after the visitor is done, I need to know how the visitor is then building a path.

Here is the definition of my graph and how I am calling astar_search, if that helps at all.

typedef adjacency_list<
     vecS,         
     vecS,        
     undirectedS, 
     VertexInfo,        //contains geographic location     
     EdgeInfo,          //contains weight information             
     no_property,     
     setS>            
        BoostGraph;
...
ColorMap cmap = get(vertex_color_t, myGraph);           
astar_search(
     myGraph, 
     source,
     distance_heuristic(myGraph, destination), //geometric distance heuristic
     predecessor_map(&srcPredmap[0]).
     distance_map(&distMap[0]).
     color_map(cmap).
     visitor(astar_goal_visitor<vertex_descriptor>(destination, this)). //throws an exception when it finds the goal
     weight_map(make_function_property_map<edge_descriptor>(  //copied make_function_property_map functionality from boost 1.51 since I can't upgrade just yet
        EdgeWeightAdjuster(&myGraph, weightFactors))));       //modifies edge weights based on weightFactors construct
  • 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-06-11T18:44:20+00:00Added an answer on June 11, 2026 at 6:44 pm

    You write: “however, since the graph is const, this is not possible…” And what about a simple CAST (event an old C-cast)? You should give this option at least a try. Modifying the graph may invalidate iterators, etc. This is true. Nevertheless you should still try.

    There is a difference between “technical const-ness” and “conceptual const-ness”. In your case you will break only the technical, not the conceptual one.

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

Sidebar

Related Questions

Running my script through Devel::NYTProf showed that the following portion of code took up
Running SQL Server 2008 (not R2). I have a few reports that have URLs
Running this query takes a long time: SELECT host,ip FROM arecords WHERE ip IN
Running an MVC web site that calls a WCF service. Site and service on
running: ruby 1.9.3p0 with Rails 3.2.1 Trying to use rspec but when I try
Running Linux (Ubuntu 11.10), the same regular expression works in JavaScript, but fails when
Running zookeeper 3.3.3. I have a znode that I am just trying to list,
Running a gwtp-sample-basic-spring app in Eclipse, I see the welcome page, but after some
Running Python, I have an image and some data calculated for different ROIs (regions
Running jetty server with ant script that starts it. I keep getting this exception

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.