Function calculate_search_direction_for_one

Function Documentation

arma::frowvec calculate_search_direction_for_one(const arma::fmat &cones, int idx1, int idx2, ConeType cone_type)

Calculates the search direction between two cones.

This function computes the search direction for one pair of cones. It computes the direction based on the relative position of the cones and applies a 90-degree rotation depending on the cone type (LEFT or RIGHT).

Parameters:
  • cones – A matrix of cone positions (N x 2).

  • idx1 – The index of the first cone.

  • idx2 – The index of the second cone.

  • cone_type – The type of cone (LEFT or RIGHT).

Returns:

The normalized search direction between the two cones (2D vector).