- Switched motor to hdb
- Changes to Hipadaba - Added project to histogram memory code - Started regression testing code - Added hill climbing as optimization method to optimise
This commit is contained in:
25
histmem.c
25
histmem.c
@ -1373,11 +1373,16 @@ static int checkHMEnd(pHistMem self, char *text){
|
||||
iStart = 0;
|
||||
}
|
||||
|
||||
if(argc > 4){
|
||||
iEnd = checkHMEnd(self,argv[4]);
|
||||
} else {
|
||||
iEnd = checkHMEnd(self,NULL);
|
||||
}
|
||||
if(argc > 4){
|
||||
iEnd = checkHMEnd(self,argv[4]);
|
||||
} else {
|
||||
iEnd = checkHMEnd(self,NULL);
|
||||
}
|
||||
|
||||
if(iNum != 0 && argc > 4)
|
||||
{
|
||||
iEnd = atoi(argv[4]);
|
||||
}
|
||||
|
||||
/* allocate data storage and get it */
|
||||
lData = (HistInt *)malloc(iEnd*sizeof(HistInt));
|
||||
@ -1387,8 +1392,14 @@ static int checkHMEnd(pHistMem self, char *text){
|
||||
return 0;
|
||||
}
|
||||
memset(lData,0,iEnd*sizeof(HistInt));
|
||||
iRet = GetHistogram(self,pCon,iNum,iStart,iEnd,
|
||||
lData,iEnd*sizeof(long));
|
||||
if(iNum == 0)
|
||||
{
|
||||
iRet = GetHistogram(self,pCon,iNum,iStart,iEnd,
|
||||
lData,iEnd*sizeof(long));
|
||||
} else {
|
||||
iRet = GetHistogramDirect(self,pCon,iNum,iStart, iEnd,
|
||||
lData, iEnd*sizeof(long));
|
||||
}
|
||||
if(!iRet)
|
||||
{
|
||||
sprintf(pBueffel,"ERROR: cannot retrieve histogram %d",iNum);
|
||||
|
Reference in New Issue
Block a user