|
From: <ds...@us...> - 2010-08-25 21:41:22
|
Revision: 5122
http://sashimi.svn.sourceforge.net/sashimi/?rev=5122&view=rev
Author: dshteyn
Date: 2010-08-25 21:41:15 +0000 (Wed, 25 Aug 2010)
Log Message:
-----------
Fix compilation bug under linux, and seed the random number generator before random number generation.
Modified Paths:
--------------
trunk/trans_proteomic_pipeline/src/Validation/ModelParser/ModelParser.cxx
Modified: trunk/trans_proteomic_pipeline/src/Validation/ModelParser/ModelParser.cxx
===================================================================
--- trunk/trans_proteomic_pipeline/src/Validation/ModelParser/ModelParser.cxx 2010-08-25 17:56:05 UTC (rev 5121)
+++ trunk/trans_proteomic_pipeline/src/Validation/ModelParser/ModelParser.cxx 2010-08-25 21:41:15 UTC (rev 5122)
@@ -405,9 +405,9 @@
time_t tStartTime = time((time_t *)NULL);;
double max_pos[MAX_CHARGE];
double max_obs[MAX_CHARGE];
- long random = (long)random(); //create random number that becomes part of the file paths
srandom((int)(strlen(filePath) + tStartTime + filePath[strlen(filePath) - 3]));
-
+ long rdm = (long)random(); //create random number that becomes part of the file paths
+
//these are ok for Linux and Windows/Cygwin (for now)
char gnuplotBlack = -1;
char gnuplotRed = 1;
@@ -428,7 +428,7 @@
fclose(fpTmp);
//call function to plot sensitivity graph
- pngSensGraphAll_ = plotSensitivity(filePath, 0, random, gnuplotRed, gnuplotGreen);
+ pngSensGraphAll_ = plotSensitivity(filePath, 0, rdm, gnuplotRed, gnuplotGreen);
//create and plot the sensitivity graph for indvidual charges
@@ -448,7 +448,7 @@
}
fclose(fpTmp);
- pngSensGraph_[i] = plotSensitivity(filePath, i + 1, random, gnuplotRed, gnuplotGreen);
+ pngSensGraph_[i] = plotSensitivity(filePath, i + 1, rdm, gnuplotRed, gnuplotGreen);
}
else
pngSensGraph_[i] = NULL;
@@ -491,10 +491,10 @@
if(chargeModelData[i].hasData)
{
//testing new plot model
- pngModel_[i] = plotModel(filePath, i + 1, false, max_obs[i], range[i], random,
+ pngModel_[i] = plotModel(filePath, i + 1, false, max_obs[i], range[i], rdm,
gnuplotBlack, gnuplotPink, gnuplotBlue, gnuplotRed);
//Now the Zoom
- pngModelZoom_[i] = plotModel(filePath, i + 1, true, max_pos[i], range[i], random,
+ pngModelZoom_[i] = plotModel(filePath, i + 1, true, max_pos[i], range[i], rdm,
gnuplotBlack, gnuplotPink, gnuplotBlue, gnuplotRed);
}
else
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|