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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T08:55:39+00:00 2026-06-09T08:55:39+00:00

I am looking at Lemon to handle my pathfinding, since it has search and

  • 0

I am looking at Lemon to handle my pathfinding, since it has search and shortest paths algorithms, among other things.

The thing is, I am already stuck right at the start in understanding how Lemon works, and they have a tutorial but no forum to ask.

My understanding of a directed graph is that you have a node, and it can link or not link to another node and then you have a weight on it.

Example:

     A    B    C
A    0    1    0
B    1    0    5
C    0    0    0

In this, A is connected to B with a weight of 1, C is connected to nothing (so once you get to C you are stuck), and B connects to A with a value of 1 and B connects to C with a value of 5.

The tutorial says to do something like this:

ListDigraph g;
ListDigraph::Node A = g.addNode();
ListDigraph::Node B = g.addNode();
ListDigraph::Node C = g.addNode();

So now I have a graph g with the three nodes. Now what? Where / how do I add the connectivity information as well as the weight values?

  • 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-09T08:55:40+00:00Added an answer on June 9, 2026 at 8:55 am

    From the Lemon tutorial

      ListDigraph g;
    
      ListDigraph::Node x = g.addNode();
      ListDigraph::Node y = g.addNode();
      ListDigraph::Node z = g.addNode();
    
      g.addArc(x,y);
      g.addArc(y,z);
      g.addArc(z,x);
    

    Never used this library mind, I’m just quoting what I’ve read.

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

Sidebar

Related Questions

Looking for opinions on if OpenCV could be or has been used to detect
looking really for some advice on how i should handle the following scenario. i
Looking at some old code we have lots of things like the following: //
Looking through some other SO questions, it appears that other people are having problems
Looking for help with a basic array problem. Program has to read a sentence
Looking for some branching strategies for a situation that has come up for a
Looking at some assembly code for x86_64 on my Mac, I see the following
Looking to do a bit of refactoring... Using NHibernate I have this query currently
Looking for a perl one-liner what will find all words with the next pattern:
Looking at the Slickgrid examples and using Google Chrome, I'm setting a breakpoint on

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.