Skip to content
Commits on Nov 18, 2011
  1. We refactored the solve method to make it cleaner, splitting the method

    committed Nov 18, 2011
    with other 2 submethods. We can now take a look at phploc because we
    are approaching an almost final version of the library.
  2. Ooooops, when solving non-existing paths the system encounters an

    committed Nov 18, 2011
    error, highlighted by the test, so we are able to fix our code.
  3. Refactoring the tests and the signator of Dijkstra's constructore

    committed Nov 18, 2011
    test are back green.
  4. Oooops, we removed the ->getGraph() method in Dijkstra and everything

    committed Nov 18, 2011
    seems to work.
    So, is the graph class necessary for our aim? We will try to refactor
    the code and see if it's needed.
  5. [to-tag] We now have replaced some dependencies, in our exception test

    committed Nov 18, 2011
    to introduce test doubles via mocking objects.
  6. [to-tag] Added an exception when solving the algorithm with negativel…

    committed Nov 18, 2011
  7. [to-tag] Now we are trying to test a new scenario: the library should

    committed Nov 18, 2011
    throw an exception when vertices are connected with negative distance
    since Dijkstra's algorithm doesn't support it.
Commits on Nov 16, 2011
  1. Changed the code into the Dijkstra class in order to use connections

    committed Nov 16, 2011
    with the Edge objects and not associative arrays anymore.
    Green tests.
  2. We want to refactor our code and eliminate simple arrays, using objects.

    committed Nov 16, 2011
    The Edge class has been created in order to be used in the ->connect()
    method of the Vertex.
    Tests not working, because our code uses edges as arrays.
  3. 9. Since the potentials, inside a graph, should be calculated

    committed Nov 16, 2011
    based on the algorithm, we moved this passage from the graph class
    to the Dijkstra one.
    Doing this we can call the ->calculatePotentials() method from the
    ->solve() method of Dijkstra itself, thus making the former method
    Since the method becomes protected, there's no need to test it.
  4. fixed README

    committed Nov 16, 2011
Commits on Nov 15, 2011
  1. 8. With final tweaks our tests are completely working.

    committed Nov 16, 2011
    We can switch to refactoring and polishing tests.
  2. 7. Tested the ->calculatePotentials() method of the Graph.

    committed Nov 16, 2011
    Now we can switch back to the algorithm's test.
  3. 6. Added a test for the ->calculatePotentials() method of the

    committed Nov 15, 2011
    graph class.
    In order to implement this test we notice that a few APIs must
    be exposed by Vertexes, like ->getPotential() and ->connect().
  4. 5. Added missing methods of the Dijkstra class,

    committed Nov 15, 2011
    now the Graph class needs to implement a crucial method,
  5. 4. I have written a logic implementation to solve the algorithm.

    committed Nov 15, 2011
    After having assigned the potentials to the nodes of the graph,
    I start from the ending one and retrieve the one which gave
    it its current potential, rebuilding the shortest path in this way.
    There are a few methods that need to be implemented.
  6. 3. Created the Graph and Vertex needed classes.

    committed Nov 15, 2011
    Added an empty solve method to the Dijktra class,
    to make the test red.
    Now it's time to implement real code.
  7. 2. Implemented first test, to solve the algorithm

    committed Nov 15, 2011
    introducing 2 needed classes, Graph and Vertex,
    that have to be created, implemented and tested.
  8. 1. Added the Symfony2 class loader to implement PSR-0 autoloading.

    committed Nov 15, 2011
    Configured PHPUnit config file.
    Added an empty test.
  9. status 0

    committed Nov 15, 2011
Something went wrong with that request. Please try again.