Harmonic Mean
The harmonic mean, . For a matrix, the function is applied over all entries. methods
harmonic_mean(x)
x
: An Expression , vector, or matrix.An Expression representing the harmonic mean of the input.
x <- Variable() prob <- Problem(Maximize(harmonic_mean(x)), list(x >= 0, x <= 5)) result <- solve(prob) result$value result$getValue(x)