Function adjacency_matrix_to_borders_and_targets
Defined in File calculate_configurations.hpp
Function Documentation
-
std::pair<std::vector<int>, std::vector<int>> adjacency_matrix_to_borders_and_targets(std::vector<std::vector<int>> adjacency_matrix)
Returns the neighbors of a node in the adjacency matrix.
Convert an adjacency matrix to two flat arrays, one representing the neighbors of each node and one which indicates the starting index of each node in the neighbors array.
- Parameters:
adjacency_matrix – The adjacency matrix.
- Returns:
A pair of vectors: the first vector contains the neighbors, and the second vector contains the starting/ending indices.