Official Coding Period: Week 7 (July 14 - July 20)
Even though a major part of this week was supposed to be the mid term review, I constantly collaborated with my mentors to work on my feedback and my goal this week was to finalise the boost implementation. (The BGL documentation is terrible btw :(( ) So I had to figure out some stuff on my own. Also initially I was planning to add weighted graph support to my algorithm but I’m keeping it as an additional goal for now. My primary work now should be able to choose which version of the sloan ordering function I must implement. I had these four options:
template <class Graph, class OutputIterator,
class ColorMap, class DegreeMap,
class PriorityMap, class Weight>
OutputIterator
sloan_ordering(Graph& g,
typename graph_traits<Graph>::vertex_descriptor s,
typename graph_traits<Graph>::vertex_descriptor e,
OutputIterator permutation,
ColorMap color,
DegreeMap degree,
PriorityMap priority,
Weight W1,
Weight W2 )
(2)
template <class Graph, class OutputIterator,
class ColorMap, class DegreeMap,
class PriorityMap, class Weight>
OutputIterator
sloan_ordering(Graph& g,
OutputIterator permutation,
ColorMap color,
DegreeMap degree,
PriorityMap priority,
Weight W1,
Weight W2 )
(3)
template <class Graph, class OutputIterator,
class ColorMap, class DegreeMap,
class PriorityMap>
OutputIterator
sloan_ordering(Graph& g,
typename graph_traits<Graph>::vertex_descriptor s,
typename graph_traits<Graph>::vertex_descriptor e,
OutputIterator permutation,
ColorMap color,
DegreeMap degree,
PriorityMap priority )
(4)
template <class Graph, class OutputIterator,
class ColorMap, class DegreeMap,
class PriorityMap>
OutputIterator
sloan_ordering(Graph& g,
OutputIterator permutation,
ColorMap color,
DegreeMap degree,
PriorityMap priority )
Version 1 of the algorithm lets the user choose the start- and end-vertex whereas version 2 finds a good starting vertex using the already mentioned sloan_starting_node algorithm. The choice of these vertices can have a significant effect on the quality of the ordering. Version 3 and 4 are identical to version 1 and 2 respectively, except that for the weights the standard weights W1=1 and W2=2 are used. Since I will not be letting the user choose custom vertices nor implementing weighted support, I chose to go with version 4.
Other than that I fixed existing errors in ordering_driver.cpp
file and made the previously disabled code reach a compilable stage.
And finally I called the get_results
function to generate the result table.