Function adjacency_matrix

Function Documentation

std::vector<std::vector<int>> adjacency_matrix(std::vector<std::array<float, 3>> cones, ConeType cone_type, const int max_n_neighbors, const float max_dist)

Create an adjacency matrix based on the distance between cones.

This function creates an adjacency matrix based on the distance between cones.

Parameters:
  • cones – Vector of cones represented as arrays of three floats [x, y, type].

  • cone_type – Type of cones to select.

  • max_n_neighbors – Maximum number of neighbors for each cone.

  • max_dist – Maximum distance to consider for neighbors.

Returns:

Adjacency matrix represented as a 2D vector of integers.