ometah-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[oMetah-devel] ometah/common random.hpp


From: NoJhan
Subject: [oMetah-devel] ometah/common random.hpp
Date: Thu, 09 Jun 2005 10:08:39 -0400

CVSROOT:        /cvsroot/ometah
Module name:    ometah
Branch:         
Changes by:     NoJhan <address@hidden> 05/06/09 14:08:39

Modified files:
        common         : random.hpp 

Log message:
        * correcting template error

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/ometah/ometah/common/random.hpp.diff?tr1=1.5&tr2=1.6&r1=text&r2=text

Patches:
Index: ometah/common/random.hpp
diff -u ometah/common/random.hpp:1.5 ometah/common/random.hpp:1.6
--- ometah/common/random.hpp:1.5        Tue Jun  7 12:11:57 2005
+++ ometah/common/random.hpp    Thu Jun  9 14:08:39 2005
@@ -1,5 +1,5 @@
  /***************************************************************************
- *  $Id: random.hpp,v 1.5 2005/06/07 12:11:57 nojhan Exp $
+ *  $Id: random.hpp,v 1.6 2005/06/09 14:08:39 nojhan Exp $
  *  Copyright : Université Paris 12 Val-de-Marne
  *              (61 avenue du Général de Gaulle, 94010, Créteil, France)
  *  Author : Johann Dréo <address@hidden>
@@ -25,6 +25,8 @@
 #ifndef RANDOM
 #define RANDOM
 
+#include <cmath>
+
 // for PI :
 #include "geometry.hpp" 
 
@@ -69,14 +71,14 @@
 
 //! Draw a vector with each scalar drawn in a normal distribution
 template<class T>
-T randomNormal( T & means, T & stds )
+vector< T > randomNormal( vector< T > & means, vector< T > & stds )
 {
-  T v;
+  vector< T > v;
 
   unsigned int i;
   for(i=0; i<means.size(); i++) {
     T x;
-    x = rand_normal(means[i], stds[i]);
+    x = randomNormal(means[i], stds[i]);
     v.push_back(x);
   }
     




reply via email to

[Prev in Thread] Current Thread [Next in Thread]