hmmer-3.3/easel/esl_vectorops.c
/* Function:  esl_vec_D2F(), esl_vec_F2D(), esl_vec_I2F(), esl_vec_I2D()
 * Synopsis:  Convert between single-precision and double-precision vectors.            
 * Incept:    SRE, Thu Mar 30 09:04:17 2006 [St. Louis]
 *
 * Purpose:   Copy a double vector <src> to a float vector <dst>. Caller
 *            provides space in the float vector that is at
 *            least <n>.
 *            
 *            Similarly, <esl_vec_F2D()> converts float to double; 
 *            <esl_vec_I2D()> converts integer to double; 
 *            <esl_vec_I2F()> converts integer to float.
 */


Copy a double vector  to a float vector . Caller
provides space in the float vector that is at
least .

Similarly,  converts float to double;
 converts integer to double;
 converts integer to float.
Copy a double vector to a float vector . Caller provides space in the float vector that is at least . Similarly converts float to double ; converts integer to double ; converts integer to float .
void
esl_vec_D2F(double *src, int n, float *dst)
{
  int i;
  for (i = 0; i < n; i++) dst[i] = src[i];
}
void esl_vec_D2F ( double * src , int n , float * dst ) { int i ; for ( i = 0 ; i < n ; i ++ ) dst [ i ] = src [ i ] ; }
Function:  esl_vec_D2F(), esl_vec_F2D(), esl_vec_I2F(), esl_vec_I2D()
 Synopsis:  Convert between single-precision and double-precision vectors.
Function : esl_vec_D2F () esl_vec_F2D () esl_vec_I2F () esl_vec_I2D () Synopsis : Convert between single - precision and double - precision vectors .