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 892033
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T13:59:10+00:00 2026-05-15T13:59:10+00:00

I have a Boost Graph with VertexList=vecS. typedef adjacency_list <listS, vecS, undirectedS, TrackInformation, LinkInformation>

  • 0

I have a Boost Graph with VertexList=vecS.

typedef adjacency_list <listS, vecS, undirectedS, TrackInformation, LinkInformation> TracksConnectionGraph;

Now I want to iterate through my vertices and remove those that have a specific property. How can I do this?

The problem is whenever I call remove_vertex, the iterator to the vertices in the graph along with the vertex descriptors are invalidated.

  • 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-15T13:59:11+00:00Added an answer on May 15, 2026 at 1:59 pm

    I don’t think it is possible (in a reasonable time) with vecS as a template parameter. Look what Boost documentation says:

    If the VertexList template parameter of the adjacency_list was vecS, then all vertex descriptors, edge descriptors, and iterators for the graph are invalidated by this operation. <…> If you need to make frequent use of the remove_vertex() function the listS selector is a much better choice for the VertexList template parameter.

    In case of listS the iterators are not invalidated by calling remove_vertex unless the iterator is pointing to the actual vertex that was removed.

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

Sidebar

Related Questions

Hi I have a boost graph like: struct Vertex; struct Edge; typedef boost::adjacency_list<boost::vecS, boost::vecS,
I have a boost::bimap and I want to iterate over all positions to add
I have a large graph (30k vertices, 250m edges) and using boost graph library
I have C++ program using boost graph library. I wonder if there is any
I am using boost graph library for solving a network graph problem. I have
I am using boost graph of type: namespace boost { struct computable_object_t { typedef
I am loading a graphviz dot diagram into a Boost::Graph object. I want to
I'm using adjacency_list< vecS, vecS, bidirectionalS ... > extensively. I have so many graphs
I have a graph with multiple edge weightings stored as namespace boost { enum
I have a boost::unordered_multimap< std::vector<int>, float> . The keys that I use to query

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.