Statistics
| Branch: | Revision:

## root / latex / note_w10.tex @ 4f432e4a

 1 %!TEX root = note.tex  %%%%%%%%%%%%%%%%%%  % WEEK 10  %%%%%%%%%%%%%%%%%%  \section{Week 10}  \subsection{Relative Betweenness Centrality}   \subsubsection{Problem: listS vs vecS}   The original code from the BGL is not working for the Graph with \lstinline{VertexList} set as \lstinline{listS}. The original code works fine for \lstinline{setS}. Below is the original code:   \begin{lstlisting}  template  void  relative_betweenness_centrality(const Graph& g, CentralityMap centrality)  {   typedef typename graph_traits::vertex_iterator vertex_iterator;   typedef typename property_traits::value_type centrality_type;   typename graph_traits::vertices_size_type n = num_vertices(g);   centrality_type factor = centrality_type(2)/centrality_type(n*n - 3*n + 2);   vertex_iterator v, v_end;   for (boost::tie(v, v_end) = vertices(g); v != v_end; ++v) {   put(centrality, *v, factor * get(centrality, *v));   }  }   \end{lstlisting}   \subsubsection{Solution 1}   Modify the \lstinline{relative_betweenness_centrality()} to also include the \lstinline{VertexIndexMap}   This is the most simplified version, where I set the same value for centrality, just to test whether the \lstinline{relative_betweenness_centrality} is working correctly with the \lstinline{VertexIndexMap v_index}.  \subsection{Comparison between networkx and BGL}   Both libraries gave the same result.   \subsubsection{Plotting with gnuplot}   \textbf{Gnuplot generating upside down plots}   Check out   \href{https://github.com/Marquezino/qwalk/issues/3}{Solution}   \begin{lstlisting}  # Change from  set term postscript enhanced color  # To  set terminal postscript eps   \end{lstlisting}