private double extremum_alpha_n(int n,double[] alpha){
  if (vec.doubleValue(n) == 0) {
    return MathUtil.HALFPI;
  }
  double tan=0;
  for (int j=n + 1; j < vec.getDimensionality(); j++) {
    double alpha_j=j == vec.getDimensionality() - 1 ? 0 : alpha[j];
    tan+=vec.doubleValue(j) * sinusProduct(n + 1,j,alpha) * Math.cos(alpha_j);
  }
  tan/=vec.doubleValue(n);
  double alpha_n=Math.atan(tan);
  if (alpha_n < 0) {
    alpha_n=Math.PI + alpha_n;
  }
  return alpha_n;
}

private double extremum_alpha_n ( int n , double [ ] alpha ) { if ( vec . doubleValue ( n ) == 0 ) { return MathUtil . HALFPI ; } double tan = 0 ; for ( int j = n + 1 ; j < vec . getDimensionality ( ) ; j ++ ) { double alpha_j = j == vec . getDimensionality ( ) - 1 ? 0 : alpha [ j ] ; tan += vec . doubleValue ( j ) * sinusProduct ( n + 1 , j , alpha ) * Math . cos ( alpha_j ) ; } tan /= vec . doubleValue ( n ) ; double alpha_n = Math . atan ( tan ) ; if ( alpha_n < 0 ) { alpha_n = Math . PI + alpha_n ; } return alpha_n ; }
determines the value for alpha_n where this function has a ( local ) extremum .
