home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Media Share 13
/
mediashare_13.zip
/
mediashare_13
/
ZIPPED
/
PROGRAM
/
APR94_1.ZIP
/
GA.ZIP
/
SOURCE.ZIP
/
GRPHPHEN.H
< prev
next >
Wrap
C/C++ Source or Header
|
1994-01-10
|
1KB
|
46 lines
//Copyright (C) Man Machine Interfaces 1994. All rights reserved.
//grphphen.h
#ifndef __GRPHPHEN_H
#define __GRPHPHEN_H
//Header for EOS class representing a phenotype
//You need EOS v1.1 to compile this code
#ifndef __PHENO_H
#include "pheno.h"
#endif //__PHENO_H
class CGraphDrawingPheno : public TPhenotype
{
public:
CGraphDrawingPheno(CGAGraphDriver &driver,int width, int height) ;
~CGraphDrawingPheno() ;
double CalcFitness() ;
void Decode(PTGenotype geno) ;
PTPhenotype Copy() ;
void GetPhenoInfo(void *pInfoStruct) ;
void GetNearestEmptyCell(const int row, const int col, int &actualRow,int &actualCol) ;
BOOL Adjacent(WORD node1, WORD node2) ;
BOOL Diagonal(WORD node1, WORD node2) ;
BOOL FindNode(const WORD node, int &row, int &col) ;
double Distance(WORD node1, WORD node2) ;
double RectDistance(WORD node1, WORD node2) ;
private:
int m_Width ;
int m_Height ;
CWordMatrix *m_pGrid ; //grid where each entry is a node number or EMPTY_CELL
CGAGraphDriver &m_Driver ; //interface to the graph driver class
int * m_GridIndex[2] ; //index into grid to quickly locate nodes
};
#endif //__GRPHPHEN_H