def alpha_min(fractions)
      fractions.compact.collect { |a| a >= 0 ? a : nil}.compact.min
    end
def alpha_min(fractions)
      fractions.compact.collect { |a| a >= 0 ? a : nil}.compact.min
    end
Gives the minimum value among the directional fractions given, taking
 into account that some of them may be nil, negative, or even -INFINITY,
 and thus needs to be excluded before extracting the valid minimum value.

 @param [Array<Float, NilClass>] fractions a collection of alpha values
 @return [Float] the minimum value among the valid alphas