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 >
Wrap
C/C++ Source or Header
|
1994-01-10
|
540b
|
24 lines
//Copyright (C) Man Machine Interfaces 1994. All rights reserved.
//grphutil.h
#ifndef __GRPHUTIL_H__
#define __GRPHUTIL_H__
const long double ln2 = logl(2.0L) ;
BYTE AllelesToByte(Allele *pAlleles, int from=0, int to=7) ;
uint AllelesToInt(Allele *pAlleles, int from=0, int to=15) ;
ulong AllelesToLong(Allele *pAlleles, int from=0, int to=31) ;
inline double log2(double num)
{
return (num == 0.0) ? 0.0 : (double) (logl((long double)num)/ln2) ;
}
int GetNumBitsToEncode(int n);
#endif // __GRPHUTIL_H__