ometah-devel
[Top][All Lists]
Advanced

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

[oMetah-devel] ometah/problem/CEC05 itsCEC05_SSRPO_Problems.cp...


From: NoJhan
Subject: [oMetah-devel] ometah/problem/CEC05 itsCEC05_SSRPO_Problems.cp...
Date: Thu, 09 Jun 2005 10:16:13 -0400

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

Modified files:
        problem/CEC05  : itsCEC05_SSRPO_Problems.cpp 
                         itsCEC05_SSRPO_Problems.hpp 

Log message:
        * common methods for CEC05 benchmark

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/ometah/ometah/problem/CEC05/itsCEC05_SSRPO_Problems.cpp.diff?tr1=1.3&tr2=1.4&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/ometah/ometah/problem/CEC05/itsCEC05_SSRPO_Problems.hpp.diff?tr1=1.1&tr2=1.2&r1=text&r2=text

Patches:
Index: ometah/problem/CEC05/itsCEC05_SSRPO_Problems.cpp
diff -u ometah/problem/CEC05/itsCEC05_SSRPO_Problems.cpp:1.3 
ometah/problem/CEC05/itsCEC05_SSRPO_Problems.cpp:1.4
--- ometah/problem/CEC05/itsCEC05_SSRPO_Problems.cpp:1.3        Thu Jun  9 
12:56:32 2005
+++ ometah/problem/CEC05/itsCEC05_SSRPO_Problems.cpp    Thu Jun  9 14:16:13 2005
@@ -1,5 +1,5 @@
 /***************************************************************************
- * $Id: itsCEC05_SSRPO_Problems.cpp,v 1.3 2005/06/09 12:56:32 nojhan Exp $
+ * $Id: itsCEC05_SSRPO_Problems.cpp,v 1.4 2005/06/09 14:16:13 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>
@@ -22,6 +22,7 @@
  */
  
 #include"../../common/matrix.hpp"
+#include"../../common/random.hpp"
 
 #include "itsCEC05_SSRPO_Problems.hpp"
 
@@ -52,7 +53,7 @@
 
     vector<vector<double> > res;
 
-    //res = multiply( solMat, this->rotationMatrix );
+    res = multiply( solMat, this->rotationMatrix );
 
     currentPoint.setSolution(res[0]);
 }
@@ -60,5 +61,23 @@
 
 void itsCEC05_SSRPO_Problem::noise()
 {
+    vector<double> val = currentPoint.getValues();
 
+    vector<double> means(val.size(), 0.0);
+    vector<double> stdev(val.size(), 1.0);
+
+    vector<double> noise = randomNormal(means, stdev) ;
+
+    currentPoint.setValues( addition( val, noise) );
+}
+
+void itsCEC05_SSRPO_Problem::addBias()
+{
+    vector<double> val = currentPoint.getValues();
+
+    for( unsigned int i=0; i<val.size(); i++ ) {
+        val[i] += this->f_bias;
+    }
+    
+    currentPoint.setValues( val );
 }
Index: ometah/problem/CEC05/itsCEC05_SSRPO_Problems.hpp
diff -u ometah/problem/CEC05/itsCEC05_SSRPO_Problems.hpp:1.1 
ometah/problem/CEC05/itsCEC05_SSRPO_Problems.hpp:1.2
--- ometah/problem/CEC05/itsCEC05_SSRPO_Problems.hpp:1.1        Tue Jun  7 
14:17:55 2005
+++ ometah/problem/CEC05/itsCEC05_SSRPO_Problems.hpp    Thu Jun  9 14:16:13 2005
@@ -1,5 +1,5 @@
 /***************************************************************************
- * $Id: itsCEC05_SSRPO_Problems.hpp,v 1.1 2005/06/07 14:17:55 nojhan Exp $
+ * $Id: itsCEC05_SSRPO_Problems.hpp,v 1.2 2005/06/09 14:16:13 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>
@@ -59,6 +59,9 @@
     //! Compute the noise
     void noise();
 
+    //! Add the bias
+    void addBias();
+
 
 public:
     itsCEC05_SSRPO_Problem();




reply via email to

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