Saturday, November 9, 2013

Chapter 3 is done

This chapter is about Graph computation and there are classical algorithms (BFS, DFS, MST). MST is implementing the classical Prim's algo but using Fibonacci heap available in Boost. Here you find the first version of the graph code


  1. The Graph misses the DTOR and it leaks. If you want I can code inspect the rest.

  2. Quick inspection, no idea if this is what you want, if this is the right direction there is still
    something to do

    - between two vertex can exist more than 1 edge ? If not then the code must be improved
    - Graph can inherit from a map and avoid to export via getNodes() the internal structure
    - Constness
    - replaced post increments with pre increment where possible
    - postponed declaration when possible
    - avoid to copy internal map inside graph
    - avoided o user operator[] on internal graph map in order to avoid not intended inserts
    - in hamiltonianCycle the "returnValue" should be returned instead of always true
    - removed not used variables

    You can find new version here

  3. Are you going to post the chapter describing these algorithms?