hmmer-3.3/easel/esl_vectorops.c
/* Function:  esl_vec_{DF}Exp(), esl_vec_{DF}Exp2()
 * Synopsis:  Converts log (or log_2) probability vector elements to probabilities.           
 *
 * Purpose:   Converts a log (or log_2) probability vector <vec> back to a 
 *            probability vector: exponentiates each of the <n> 
 *            values in the vector.
 *            
 *            This routine only calls <exp()> on the elements of 
 *            vector, which are presumed to be log probabilities;
 *            whether the resulting vector is a properly normalized
 *            probability vector is the caller's problem.
 *
 */
esl_vec_{DF}Exp(), esl_vec_{DF}Exp2()
Synopsis:  Converts log (or log_2) probability vector elements to probabilities.

Converts a log (or log_2) probability vector  back to a
probability vector: exponentiates each of the 
values in the vector.

This routine only calls  on the elements of
vector, which are presumed to be log probabilities;
whether the resulting vector is a properly normalized
probability vector is the caller's problem.
esl_vec_ { DF } Exp () esl_vec_ { DF } Exp2 () Synopsis : Converts log ( or log_2 ) probability vector elements to probabilities . Converts a log ( or log_2 ) probability vector back to a probability vector : exponentiates each of the values in the vector . This routine only calls on the elements of vector which are presumed to be log probabilities ; whether the resulting vector is a properly normalized probability vector is the caller ' s problem .
void
esl_vec_DExp(double *vec, int n)
{
  int i;
  for (i = 0; i < n; i++) vec[i] = exp(vec[i]);
}
void esl_vec_DExp ( double * vec , int n ) { int i ; for ( i = 0 ; i < n ; i ++ ) vec [ i ] = exp ( vec [ i ] ) ; }
Function:  esl_vec_{DF}Exp(), esl_vec_{DF}Exp2()
 Synopsis:  Converts log (or log_2) probability vector elements to probabilities.
Function : esl_vec_ { DF } Exp () esl_vec_ { DF } Exp2 () Synopsis : Converts log ( or log_2 ) probability vector elements to probabilities .