algorithm_functions.hyperlink_cost_function#
- algorithm_functions.hyperlink_cost_function(x: float | numpy.ndarray) float | numpy.ndarray #
Calculates the hyperlink cost function for a transition probability or matrix.
The objective function is equal to \(0.42sin(1.5\pi x)+ 1.92x^3\).
- Parameters:
x (float | np.ndarray) – The transition probability (float) or the transition matrix (np.ndarray).
- Returns:
float | np.ndarray – The hyperlink costs as float (if input is float) or as np.ndarray (if input is np.ndarray).