comnum.water_filling_powers#

comnum.water_filling_powers(gains, total_power)#

Water-filling powers of parallel channels: p_i = (μ - 1/g_i)⁺ with Σ p_i the total power.

Parameters:
  • gains (array_like) – the gains g_i (SNR per unit power).

  • total_power (float) – the total power.

Returns:

the power of every channel (float64).

Return type:

numpy.ndarray

Raises:

ValueError – for an invalid parameter or input (the message names it).

Examples

>>> import comnum
>>> comnum.water_filling_powers([1.0, 1.0], 2.0).tolist()
[1.0, 1.0]