Skip to content

Add feature : Dijkstra with Node and Edge Objects via Protocol - #1

Open
topchul wants to merge 4 commits into
dmitrikozlov:masterfrom
topchul:master
Open

Add feature : Dijkstra with Node and Edge Objects via Protocol#1
topchul wants to merge 4 commits into
dmitrikozlov:masterfrom
topchul:master

Conversation

@topchul

@topchul topchul commented Jun 21, 2013

Copy link
Copy Markdown

It's a great implementation of dijkstra.

I compare some implementations.
It's easy to read, so good.

but, It just use Dictionaries.
I want to use with core data or other repositories with objects.

So, I added 2 protocols(Node, Edge).
And clone your algorithm with the protocols.

I added 3 test case testDijkstraWithNodes, testShortestPathWithNodes, testShortestPathWithCirculaNodes.
You can easily check equivalent cases via [graph description].

I want to merge this fearture.

Thanks for your efforts.

test case

  • testDijkstraWithNodes - equivalent test case of testDijkstra
  • testShortestPathWithNodes - equivalent test case of testShortestPath
  • testShortestPathWithCirculaNodes - Dijkstra with a circle nodes.
  • DijkstraNode <NSObject, NSCopying> - NSCopying for using a Dictionary Key
  • DijkstraEdge - from, to, length
  • DijkstraNodeTestImpl.h - Node implementation For Test case.
  • DijkstraEdgeTestImpl.h - Edge implementation For Test case.

@dmitrikozlov

Copy link
Copy Markdown
Owner

Hi Gregory,

Thank you very much for your input. I am a bit busy at the moment. I will
review your code later and get back to you.

Regards,
Dmitri

On 21 June 2013 12:04, Gregory J.H. Rho notifications@github.com wrote:

It's a great implementation of dijkstra.

I compare some implementations.
It's easy to read, so good.

but, It just use Dictionaries.
I want to use with core data or other repositories with objects.

So, I added 2 protocols(Node, Edge).
And clone your algorithm with the protocols.

I added 3 test case testDijkstraWithNodes, testShortestPathWithNodes,
testShortestPathWithCirculaNodes.
You can easily check equivalent cases via [graph description].

I want to merge this fearture.
Thanks for your efforts.

#test case

  • testDijkstraWithNodes - equivalent test case of testDijkstra

  • testShortestPathWithNodes - equivalent test case of testShortestPath

    testShortestPathWithCirculaNodes - Dijkstra with a circle nodes.

    DijkstraNode - NSCopying for using a Dictionary Key

    DijkstraEdge

    DijkstraNodeTestImpl.h

    DijkstraEdgeTestImpl.h


You can merge this Pull Request by running

git pull https://github.com/topchul/mj-dijkstra master

Or view, comment on, or merge it at:

#1
Commit Summary

  • new feature : Dijkstra with ObjectNode and ObjectEdge via
    objective-C protocols
  • add missed memory management codes.

File Changes

Patch Links:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants