[Rsiena-commits] r209 - in pkg: RSiena RSienaTest RSienaTest/src/model/effects

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Wed Mar 28 15:33:04 CEST 2012


Author: cgreenan
Date: 2012-03-28 15:33:03 +0200 (Wed, 28 Mar 2012)
New Revision: 209

Modified:
   pkg/RSiena/DESCRIPTION
   pkg/RSiena/changeLog
   pkg/RSienaTest/DESCRIPTION
   pkg/RSienaTest/changeLog
   pkg/RSienaTest/src/model/effects/DiffusionRateEffect.cpp
Log:


Modified: pkg/RSiena/DESCRIPTION
===================================================================
--- pkg/RSiena/DESCRIPTION	2012-03-25 15:42:52 UTC (rev 208)
+++ pkg/RSiena/DESCRIPTION	2012-03-28 13:33:03 UTC (rev 209)
@@ -1,8 +1,8 @@
 Package: RSiena
 Type: Package
 Title: Siena - Simulation Investigation for Empirical Network Analysis
-Version: 1.0.12.208
-Date: 2012-03-25
+Version: 1.0.12.209
+Date: 2012-03-28
 Author: Various
 Depends: R (>= 2.10.0)
 Imports: Matrix

Modified: pkg/RSiena/changeLog
===================================================================
--- pkg/RSiena/changeLog	2012-03-25 15:42:52 UTC (rev 208)
+++ pkg/RSiena/changeLog	2012-03-28 13:33:03 UTC (rev 209)
@@ -1,3 +1,7 @@
+2012-03-28 R-forge revision 209 (RSienaTest only)
+
+	* src/model/effects/DiffusionRateEffect.cpp: bug fix
+
 2012-03-25 R-forge revision 208
 
 	* src/data/BehaviorLongitudinalData.cpp: fix memory leak

Modified: pkg/RSienaTest/DESCRIPTION
===================================================================
--- pkg/RSienaTest/DESCRIPTION	2012-03-25 15:42:52 UTC (rev 208)
+++ pkg/RSienaTest/DESCRIPTION	2012-03-28 13:33:03 UTC (rev 209)
@@ -1,8 +1,8 @@
 Package: RSienaTest
 Type: Package
 Title: Siena - Simulation Investigation for Empirical Network Analysis
-Version: 1.0.12.208
-Date: 2012-03-25
+Version: 1.0.12.209
+Date: 2012-03-28
 Author: Various
 Depends: R (>= 2.10.0)
 Imports: Matrix

Modified: pkg/RSienaTest/changeLog
===================================================================
--- pkg/RSienaTest/changeLog	2012-03-25 15:42:52 UTC (rev 208)
+++ pkg/RSienaTest/changeLog	2012-03-28 13:33:03 UTC (rev 209)
@@ -1,3 +1,7 @@
+2012-03-28 R-forge revision 209 (RSienaTest only)
+
+	* src/model/effects/DiffusionRateEffect.cpp: bug fix
+
 2012-03-25 R-forge revision 208
 
 	* src/data/BehaviorLongitudinalData.cpp: fix memory leak

Modified: pkg/RSienaTest/src/model/effects/DiffusionRateEffect.cpp
===================================================================
--- pkg/RSienaTest/src/model/effects/DiffusionRateEffect.cpp	2012-03-25 15:42:52 UTC (rev 208)
+++ pkg/RSienaTest/src/model/effects/DiffusionRateEffect.cpp	2012-03-28 13:33:03 UTC (rev 209)
@@ -141,13 +141,15 @@
 		}
 	}
 
-	if (egoNumer * totalAlterValue==0)
+	totalAlterValue *= egoNumer;
+
+	if (totalAlterValue == 0)
 	{
 		return 1;
 	}
 	else
 	{
-		return this->lpTable->value(egoNumer * totalAlterValue, egoDenom);
+		return this->lpTable->value(totalAlterValue, egoDenom);
 	}
 }
 
@@ -195,7 +197,7 @@
 	}
 	else if (this->leffectName == "infectCovar")
 	{
-		int totalAlterValue = 0;
+		double totalAlterValue = 0;
 		if (pNetwork->outDegree(i) > 0)
 		{
 			for (IncidentTieIterator iter = pNetwork->outTies(i);
@@ -223,7 +225,7 @@
 				totalAlterValue += alterValue;
 			}
 		}
-		if (totalAlterValue==0)
+		if (fabs(totalAlterValue) < 1e-6)
 		{
 			return 1;
 		}



More information about the Rsiena-commits mailing list