29 int numberOfNodes = boost::num_vertices( *(m_Network->GetBoostGraph()) );
32 vnl_matrix<double> matrix(numberOfNodes, numberOfNodes, 0);
36 for(boost::tie(vi, vi_end) = boost::vertices( *(m_Network->GetBoostGraph()) ); vi != vi_end; ++vi)
40 for(boost::tie(neighbors, neighbors_end) = boost::adjacent_vertices(*vi, *(m_Network->GetBoostGraph()) );
41 neighbors != neighbors_end; ++neighbors )
44 matrix.put(*vi, *neighbors, 1);
52 int numberOfNodes = boost::num_vertices( *(m_Network->GetBoostGraph()) );
54 vnl_matrix<double> matrix( numberOfNodes, numberOfNodes, 0);
58 for(boost::tie(vi, vi_end) = boost::vertices( *(m_Network->GetBoostGraph()) ); vi != vi_end; ++vi)
60 double numberOfNeighbors = 0;
63 for( boost::tie(neighbors, neighbors_end) = adjacent_vertices(*vi, *(m_Network->GetBoostGraph()) );
64 neighbors != neighbors_end; ++neighbors )
68 matrix.put(*vi, *vi, numberOfNeighbors);
ConnectomicsNetworkConverter()
vnl_matrix< double > GetNetworkAsVNLDegreeMatrix()
~ConnectomicsNetworkConverter()
boost::graph_traits< NetworkType >::adjacency_iterator AdjacencyIteratorType
vnl_matrix< double > GetNetworkAsVNLAdjacencyMatrix()
boost::graph_traits< NetworkType >::vertex_iterator VertexIteratorType