[Avida-SVN] r3532 - in development: . source/actions source/main
baerb at myxo.css.msu.edu
baerb at myxo.css.msu.edu
Wed Nov 18 10:31:25 PST 2009
Author: baerb
Date: 2009-11-18 13:31:24 -0500 (Wed, 18 Nov 2009)
New Revision: 3532
Modified:
development/Avida.vcproj
development/source/actions/PopulationActions.cc
development/source/main/cGenomeUtil.cc
Log:
Made changes to allow code to compile under Windows Visual Studio 2005
Modified: development/Avida.vcproj
===================================================================
--- development/Avida.vcproj 2009-11-17 20:38:54 UTC (rev 3531)
+++ development/Avida.vcproj 2009-11-18 18:31:24 UTC (rev 3532)
@@ -297,6 +297,38 @@
>
</File>
<File
+ RelativePath=".\source\main\cBirthDemeHandler.h"
+ >
+ </File>
+ <File
+ RelativePath=".\source\main\cBirthGenomeSizeHandler.h"
+ >
+ </File>
+ <File
+ RelativePath=".\source\main\cBirthGlobalHandler.h"
+ >
+ </File>
+ <File
+ RelativePath=".\source\main\cBirthGridLocalHandler.h"
+ >
+ </File>
+ <File
+ RelativePath=".\source\main\cBirthMateSelectHandler.h"
+ >
+ </File>
+ <File
+ RelativePath=".\source\main\cBirthNeighborhoodHandler.h"
+ >
+ </File>
+ <File
+ RelativePath=".\source\main\cBirthSelectionHandler.h"
+ >
+ </File>
+ <File
+ RelativePath=".\source\tools\cBitArray.h"
+ >
+ </File>
+ <File
RelativePath=".\source\tools\cBlockStruct.h"
>
</File>
@@ -377,10 +409,26 @@
>
</File>
<File
+ RelativePath=".\source\main\cDemeNetwork.h"
+ >
+ </File>
+ <File
+ RelativePath=".\source\main\cDemeNetworkUtils.h"
+ >
+ </File>
+ <File
+ RelativePath=".\source\main\cDemePredicate.h"
+ >
+ </File>
+ <File
RelativePath=".\source\tools\cDemeProbSchedule.h"
>
</File>
<File
+ RelativePath=".\source\main\cDemeTopologyNetwork.h"
+ >
+ </File>
+ <File
RelativePath=".\source\tools\cDoubleSum.h"
>
</File>
@@ -1173,6 +1221,38 @@
>
</File>
<File
+ RelativePath=".\source\main\cBirthDemeHandler.cc"
+ >
+ </File>
+ <File
+ RelativePath=".\source\main\cBirthGenomeSizeHandler.cc"
+ >
+ </File>
+ <File
+ RelativePath=".\source\main\cBirthGlobalHandler.cc"
+ >
+ </File>
+ <File
+ RelativePath=".\source\main\cBirthGridLocalHandler.cc"
+ >
+ </File>
+ <File
+ RelativePath=".\source\main\cBirthMateSelectHandler.cc"
+ >
+ </File>
+ <File
+ RelativePath=".\source\main\cBirthNeighborhoodHandler.cc"
+ >
+ </File>
+ <File
+ RelativePath=".\source\main\cBirthSelectionHandler.cc"
+ >
+ </File>
+ <File
+ RelativePath=".\source\tools\cBitArray.cc"
+ >
+ </File>
+ <File
RelativePath=".\source\tools\cBlockStruct.cc"
>
</File>
@@ -1245,11 +1325,15 @@
>
</File>
<File
+ RelativePath=".\source\main\cDemeNetwork.cc"
+ >
+ </File>
+ <File
RelativePath=".\source\tools\cDemeProbSchedule.cc"
>
</File>
<File
- RelativePath=".\source\tools\cDoubleSum.cc"
+ RelativePath=".\source\main\cDemeTopologyNetwork.cc"
>
</File>
<File
Modified: development/source/actions/PopulationActions.cc
===================================================================
--- development/source/actions/PopulationActions.cc 2009-11-17 20:38:54 UTC (rev 3531)
+++ development/source/actions/PopulationActions.cc 2009-11-18 18:31:24 UTC (rev 3532)
@@ -1079,7 +1079,7 @@
double killprob;
if(m_exponent == -1.0)
- killprob = min(1.0/(m_exprWeight+ exp(-count)), 100.0)/100.0; //sigmoid
+ killprob = min(1.0/(m_exprWeight+ exp(double(-count))), 100.0)/100.0; //sigmoid
else
killprob = min(pow(m_exprWeight*count,m_exponent), 100.0)/100.0; // linear and exponential
Modified: development/source/main/cGenomeUtil.cc
===================================================================
--- development/source/main/cGenomeUtil.cc 2009-11-17 20:38:54 UTC (rev 3531)
+++ development/source/main/cGenomeUtil.cc 2009-11-18 18:31:24 UTC (rev 3532)
@@ -31,12 +31,13 @@
#include "cInstSet.h"
#include "functions.h"
#include <algorithm>
-#include <strings.h>
+// #include <strings.h>
using namespace std;
+
int cGenomeUtil::FindInst(const cGenome & gen, const cInstruction & inst,
int start_index)
{
@@ -255,10 +256,12 @@
substring_match_list_type ssml(base.GetSize());
const int rows=substring.GetSize()+1;
const int cols=base.GetSize()+1;
- int costmat[2][cols];
- int* c=costmat[0]; // current row
- int* p=costmat[1]; // previous row
- bzero(costmat, sizeof(int)*2*cols);
+ int* c = new int[cols]; // current row
+ int* p = new int[cols]; // previous row
+ for (int j=0; j<cols; ++j) {
+ c[j] = 0;
+ p[j] = 0;
+ }
for(int i=1; i<rows; ++i) {
c[0] = p[0]+1;
@@ -457,3 +460,4 @@
return genome;
}
+
More information about the Avida-cvs
mailing list