diff --git a/src/network.cpp b/src/network.cpp index 5c7d196..f0659f2 100644 --- a/src/network.cpp +++ b/src/network.cpp @@ -47,12 +47,12 @@ std::vector> Seldon::Network::strongly_connected_components( std::span Seldon::Network::get_neighbours( std::size_t agent_idx ) const { - return std::span( neighbour_list[agent_idx].cbegin(), neighbour_list[agent_idx].cend() ); + return std::span( neighbour_list[agent_idx].begin(), neighbour_list[agent_idx].size() ); } std::span Seldon::Network::get_neighbours( std::size_t agent_idx ) { - return std::span( neighbour_list[agent_idx].begin(), neighbour_list[agent_idx].end() ); + return std::span( neighbour_list[agent_idx].begin(), neighbour_list[agent_idx].size() ); } void Seldon::Network::set_neighbours_and_weights( @@ -84,12 +84,12 @@ void Seldon::Network::push_back_neighbour_and_weight( size_t i, size_t j, Weight std::span Seldon::Network::get_weights( std::size_t agent_idx ) const { - return std::span( weight_list[agent_idx].cbegin(), weight_list[agent_idx].cend() ); + return std::span( weight_list[agent_idx].cbegin(), weight_list[agent_idx].size() ); } std::span Seldon::Network::get_weights( std::size_t agent_idx ) { - return std::span( weight_list[agent_idx].begin(), weight_list[agent_idx].end() ); + return std::span( weight_list[agent_idx].begin(), weight_list[agent_idx].size() ); } void Seldon::Network::set_weights( std::size_t agent_idx, std::span weights )