ometah-devel
[Top][All Lists]
Advanced

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

[oMetah-devel] ometah communication/itsCommunicationClient.hpp...


From: Johann
Subject: [oMetah-devel] ometah communication/itsCommunicationClient.hpp...
Date: Fri, 11 Mar 2005 14:09:52 -0500

CVSROOT:        /cvsroot/ometah
Module name:    ometah
Branch:         
Changes by:     Johann <address@hidden> 05/03/11 19:09:51

Modified files:
        communication  : itsCommunicationClient.hpp 
        metaheuristic  : itsEstimationOfDistribution.cpp 
                         itsEstimationOfDistribution.hpp 
                         itsMetaheuristic.cpp itsMetaheuristic.hpp 

Log message:
        * corrections of compilations problems

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/ometah/ometah/communication/itsCommunicationClient.hpp.diff?tr1=1.2&tr2=1.3&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/ometah/ometah/metaheuristic/itsEstimationOfDistribution.cpp.diff?tr1=1.5&tr2=1.6&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/ometah/ometah/metaheuristic/itsEstimationOfDistribution.hpp.diff?tr1=1.5&tr2=1.6&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/ometah/ometah/metaheuristic/itsMetaheuristic.cpp.diff?tr1=1.3&tr2=1.4&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/ometah/ometah/metaheuristic/itsMetaheuristic.hpp.diff?tr1=1.3&tr2=1.4&r1=text&r2=text

Patches:
Index: ometah/communication/itsCommunicationClient.hpp
diff -u ometah/communication/itsCommunicationClient.hpp:1.2 
ometah/communication/itsCommunicationClient.hpp:1.3
--- ometah/communication/itsCommunicationClient.hpp:1.2 Fri Mar 11 10:27:02 2005
+++ ometah/communication/itsCommunicationClient.hpp     Fri Mar 11 19:09:51 2005
@@ -1,7 +1,7 @@
 /***************************************************************************
  *  itsCommunicationClientt.hpp
  *
- *  $Id: itsCommunicationClient.hpp,v 1.2 2005/03/11 10:27:02 nojhan Exp $
+ *  $Id: itsCommunicationClient.hpp,v 1.3 2005/03/11 19:09:51 nojhan Exp $
  *  Author : Johann Dréo <address@hidden>
  ****************************************************************************/
 
@@ -44,6 +44,9 @@
     a matrix with each dimension on a row.
    */
   vector<vector<double> > bounds();
+
+  //! Return the dimension
+  int getDimension();
 };
 
 #endif
Index: ometah/metaheuristic/itsEstimationOfDistribution.cpp
diff -u ometah/metaheuristic/itsEstimationOfDistribution.cpp:1.5 
ometah/metaheuristic/itsEstimationOfDistribution.cpp:1.6
--- ometah/metaheuristic/itsEstimationOfDistribution.cpp:1.5    Fri Mar 11 
12:06:55 2005
+++ ometah/metaheuristic/itsEstimationOfDistribution.cpp        Fri Mar 11 
19:09:51 2005
@@ -1,7 +1,7 @@
 /***************************************************************************
  *  itsMetaheuristic.hpp 
  *   
- *  $Id: itsEstimationOfDistribution.cpp,v 1.5 2005/03/11 12:06:55 nojhan Exp $
+ *  $Id: itsEstimationOfDistribution.cpp,v 1.6 2005/03/11 19:09:51 nojhan Exp $
  *  Author : Johann Dréo <address@hidden>
  ****************************************************************************/
 
@@ -24,7 +24,15 @@
  */
  
 
+
+
 #include "itsEstimationOfDistribution.hpp"
+#include "../common/matrix.hpp"
+#include "../common/random.hpp"
+
+#include <vector>
+
+using namespace std;
 
 itsEstimationOfDistribution::itsEstimationOfDistribution()
 {
@@ -46,15 +54,18 @@
     transposedSimplifiedSample = transpose(transposedSimplifiedSample);
 
     // verify that we have the correct dimension
-    if( transposedSimplifiedSample.size() != this->getDimension() ) {
+    if( transposedSimplifiedSample.size() != this->problem->getDimension() ) {
         throw "ErrorSize";
     }
 
     // find the minimum and the maximum for each dimension  
-    for(unsigned int dim=0; dim < getDimension(); dim++) {
+    for(unsigned int dim=0; dim < this->problem->getDimension(); dim++) {
         // store them
-        this->parameterUniformMinima.push_back( min( 
transposedSimplifiedSample[dim] ) );
-        this->parameterUniformMaxima.push_back( max( 
transposedSimplifiedSample[dim] ) );
+        vector<double> v = transposedSimplifiedSample[dim];
+        double mi = minimum( v );
+        
+        this->parameterUniformMinima.push_back( mi );
+        this->parameterUniformMaxima.push_back( maximum( 
transposedSimplifiedSample[dim] ) );
     }
 }
  
@@ -63,9 +74,9 @@
     // draw each point in an hyper cube
     for( unsigned int i=0; i < getSampleSize(); i++) {
         // draw solution
-        sample[i].setSolution( randomHyperCube(this->parameterUniformMinima, 
this->parameterUniformMaxima) );
+        sample[i].setSolution( randomUniform(this->parameterUniformMinima, 
this->parameterUniformMaxima) );
         // get values
-        sample[i] = this->problem.call(sample[i]);
+        sample[i] = this->problem->call(sample[i]);
     }
 }
 
Index: ometah/metaheuristic/itsEstimationOfDistribution.hpp
diff -u ometah/metaheuristic/itsEstimationOfDistribution.hpp:1.5 
ometah/metaheuristic/itsEstimationOfDistribution.hpp:1.6
--- ometah/metaheuristic/itsEstimationOfDistribution.hpp:1.5    Fri Mar 11 
10:26:08 2005
+++ ometah/metaheuristic/itsEstimationOfDistribution.hpp        Fri Mar 11 
19:09:51 2005
@@ -1,5 +1,5 @@
 /***************************************************************************
- *  $Id: itsEstimationOfDistribution.hpp,v 1.5 2005/03/11 10:26:08 nojhan Exp $
+ *  $Id: itsEstimationOfDistribution.hpp,v 1.6 2005/03/11 19:09:51 nojhan Exp $
  *  Author : Johann Dréo <address@hidden>
  ****************************************************************************/
 
@@ -25,8 +25,9 @@
 #define ITSESTIMATIONOFDISTRIBUTION
  
 #include "itsMetaheuristic.hpp"
-#include "../common/matrix.hpp"
- 
+
+using namespace std;
+
 class itsEstimationOfDistribution : public itsMetaheuristic
 {
 protected:
Index: ometah/metaheuristic/itsMetaheuristic.cpp
diff -u ometah/metaheuristic/itsMetaheuristic.cpp:1.3 
ometah/metaheuristic/itsMetaheuristic.cpp:1.4
--- ometah/metaheuristic/itsMetaheuristic.cpp:1.3       Thu Mar  3 13:02:57 2005
+++ ometah/metaheuristic/itsMetaheuristic.cpp   Fri Mar 11 19:09:51 2005
@@ -120,3 +120,86 @@
     return false;
   }
 }
+
+
+
+ 
+
+string getName()
+{
+    return this->name;
+}
+
+void setName(string name)
+{
+    this->name = name;
+}
+
+
+string getAccronym()
+{
+    return this->accronym;
+}
+
+void setAccronym(string accronym)
+{
+    this->accronym = accronym;
+}
+
+
+string getDescription()
+{
+    return this->description;
+}
+
+void setDescription(string description)
+{
+    this->description = description;
+}
+  
+
+string getCitation()
+{
+    return this->citation;
+}
+
+void setCitation(string citation)
+{
+    this->citation = citation;
+}
+
+
+string getFamily()
+{
+    return this->family;
+}
+
+void setFamily(string family)
+{
+    this->family = family;
+}
+
+
+int getSampleSize()
+{
+    return this->sampleSize;
+}
+
+void setSampleSize(int size)
+{
+    this->sampleSize = size;
+    // WARNING : changing the size cause the vector to be reinitialized
+    this->sample.erase();
+    this->sample.reserve( this->sampleSize );
+}
+
+
+string getIterationsMaxNumber()
+{
+    return this->iterationsMaxNumber;
+}
+
+void setIterationsMaxNumber(string nbr)
+{
+    this->iterationsMaxNumber = nbr;
+}
Index: ometah/metaheuristic/itsMetaheuristic.hpp
diff -u ometah/metaheuristic/itsMetaheuristic.hpp:1.3 
ometah/metaheuristic/itsMetaheuristic.hpp:1.4
--- ometah/metaheuristic/itsMetaheuristic.hpp:1.3       Fri Mar 11 10:26:08 2005
+++ ometah/metaheuristic/itsMetaheuristic.hpp   Fri Mar 11 19:09:51 2005
@@ -176,7 +176,7 @@
   //! Return the accronym
   string getAccronym();
   //! Change the Accronym
-  void setAccronym(string citation);
+  void setAccronym(string accronym);
 
   //! Return the description
   string getDescription();
@@ -191,18 +191,21 @@
   //! Return the family
   string getFamily();
   //! Change the reference
-  void setFamily(string citation);
+  void setFamily(string family);
 
   //! Return the sample size
-  string getSampleSize();
+  int getSampleSize();
   //! Change the sample size
-  void setSampleSize(string size);
+  /*!
+    WARNING : changing the size cause the vector to be reinitialized
+  */
+  void setSampleSize(int size);
 
   //! Return the maximum iterations number
   string getIterationsMaxNumber();
   //! Change the  maximum iterations number
-  void setIterationsMaxNumber(string size);
-
+  void setIterationsMaxNumber(string nbr);
+    
   //@}
 };
 




reply via email to

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