protected static double eq24 ( final double beta_i , final double gN , final double gP , final double U ) { //6.2.2 double vi = 0 ; //Used as "other" value if ( beta_i == 0 ) //if beta_i = 0 ... { //if beta_i = 0 and g'n(beta_i) >= 0 if ( gN >= 0 ) vi = gN ; else if ( gP <= 0 ) //if beta_i = 0 and g'p(beta_i) <= 0 vi = - gP ; } else //beta_i is non zero { //Two cases //if beta_i in (−U, 0), or //beta_i = −U and g'n(beta_i) <= 0 //then v_i = |g'n| //if beta_i in (0,U), or //beta_i = U and g'p(βi) >= 0 //then v_i = |g'p| if ( beta_i < 0 ) //first set of cases { if ( beta_i > - U || ( beta_i == - U && gN <= 0 ) ) vi = Math . abs ( gN ) ; } else //second case { if ( beta_i < U || ( beta_i == U && gP >= 0 ) ) vi = Math . abs ( gP ) ; } } return vi ; }
returns the result of evaluation equation 24 of an individual index