home *** CD-ROM | disk | FTP | other *** search
/ Media Share 13 / mediashare_13.zip / mediashare_13 / ZIPPED / PROGRAM / APR94_1.ZIP / GA.ZIP / SOURCE.ZIP / GRPHUTIL.H < prev    next >
C/C++ Source or Header  |  1994-01-10  |  540b  |  24 lines

  1. //Copyright (C) Man Machine Interfaces 1994. All rights reserved.
  2. //grphutil.h
  3.  
  4. #ifndef __GRPHUTIL_H__
  5. #define __GRPHUTIL_H__
  6.  
  7. const long double ln2 = logl(2.0L) ;
  8.  
  9. BYTE AllelesToByte(Allele *pAlleles, int from=0, int to=7) ;
  10.  
  11. uint AllelesToInt(Allele *pAlleles, int from=0, int to=15) ;
  12.  
  13. ulong AllelesToLong(Allele *pAlleles, int from=0, int to=31) ;
  14.  
  15. inline double log2(double num)
  16. {
  17.     return (num == 0.0) ? 0.0 : (double) (logl((long double)num)/ln2) ; 
  18. }
  19.  
  20. int GetNumBitsToEncode(int n);
  21.  
  22. #endif // __GRPHUTIL_H__
  23.  
  24.