4 Replies - 382 Views - Last Post: 28 April 2014 - 10:34 AM Rate Topic: -----

#1 M-rhodes  Icon User is offline

  • D.I.C Head

Reputation: 1
  • View blog
  • Posts: 131
  • Joined: 24-September 10

[Q] How should I assign distance values to a fixed graph?

Posted 28 April 2014 - 10:05 AM

Hi guys,

I'm working on a Dijkstra's algorithm with a fixed graph. My question is, how should I go about assign distance values to the graph. The user can start from any node.

Posted Image

Posted Image

All help is appreciated.

Is This A Good Question/Topic? 0
  • +

Replies To: [Q] How should I assign distance values to a fixed graph?

#2 modi123_1  Icon User is offline

  • Suitor #2
  • member icon



Reputation: 8962
  • View blog
  • Posts: 33,586
  • Joined: 12-June 08

Re: [Q] How should I assign distance values to a fixed graph?

Posted 28 April 2014 - 10:15 AM

It seems straight forward.. for any given node the value of distance to any neighboring 8 cells is '1'.
Was This Post Helpful? 0
  • +
  • -

#3 M-rhodes  Icon User is offline

  • D.I.C Head

Reputation: 1
  • View blog
  • Posts: 131
  • Joined: 24-September 10

Re: [Q] How should I assign distance values to a fixed graph?

Posted 28 April 2014 - 10:28 AM

View Postmodi123_1, on 28 April 2014 - 10:15 AM, said:

It seems straight forward.. for any given node the value of distance to any neighboring 8 cells is '1'.


Thanks for the response! To confirm, do you mean that all neighbouring nodes to the start node are 1 and outer nodes increase?

For example, if M is the start node, G,H,I,L,N,Q,R,S, are 1 away from M?

Apologies if my response is a little ambiguous, I'm quite tired today. :)
Was This Post Helpful? 0
  • +
  • -

#4 modi123_1  Icon User is offline

  • Suitor #2
  • member icon



Reputation: 8962
  • View blog
  • Posts: 33,586
  • Joined: 12-June 08

Re: [Q] How should I assign distance values to a fixed graph?

Posted 28 April 2014 - 10:32 AM

How ever you want to divide or number, but yeah.. any immediate neighbor to the node is '1' distance away.
Was This Post Helpful? 0
  • +
  • -

#5 M-rhodes  Icon User is offline

  • D.I.C Head

Reputation: 1
  • View blog
  • Posts: 131
  • Joined: 24-September 10

Re: [Q] How should I assign distance values to a fixed graph?

Posted 28 April 2014 - 10:34 AM

View Postmodi123_1, on 28 April 2014 - 10:32 AM, said:

How ever you want to divide or number, but yeah.. any immediate neighbor to the node is '1' distance away.


Thanks for confirming. I tried to +rep you, but I keep getting sent to the top of the page.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1