Template Function indi_controller::sqrt_keep_sign

Function Documentation

template<typename Vector>
Vector indi_controller::sqrt_keep_sign(const Vector &vector)

Compute element-wise square root and keep the sign.

This function computes the square root of each element of the input vector and retains the original sign of each element.

Template Parameters:

Vector – The type of the input vector (Eigen vector type)

Parameters:

vector – The input vector

Returns:

Vector The resulting vector with square root of elements and original sign