ometah-devel
[Top][All Lists]
Advanced

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

[oMetah-devel] ometah common/itsSet.hpp common/logic.cpp commo...


From: Johann
Subject: [oMetah-devel] ometah common/itsSet.hpp common/logic.cpp commo...
Date: Sat, 26 Mar 2005 06:46:47 -0500

CVSROOT:        /cvsroot/ometah
Module name:    ometah
Branch:         
Changes by:     Johann <address@hidden> 05/03/26 11:46:47

Modified files:
        common         : itsSet.hpp logic.cpp logic.hpp 
        communication  : itsCommunicationClient.hpp 
        interface      : ometah.cpp 

Log message:
        * corrections of hash_map use

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/ometah/ometah/common/itsSet.hpp.diff?tr1=1.8&tr2=1.9&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/ometah/ometah/common/logic.cpp.diff?tr1=1.5&tr2=1.6&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/ometah/ometah/common/logic.hpp.diff?tr1=1.3&tr2=1.4&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/ometah/ometah/communication/itsCommunicationClient.hpp.diff?tr1=1.6&tr2=1.7&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/ometah/ometah/interface/ometah.cpp.diff?tr1=1.6&tr2=1.7&r1=text&r2=text

Patches:
Index: ometah/common/itsSet.hpp
diff -u ometah/common/itsSet.hpp:1.8 ometah/common/itsSet.hpp:1.9
--- ometah/common/itsSet.hpp:1.8        Sat Mar 26 09:17:38 2005
+++ ometah/common/itsSet.hpp    Sat Mar 26 11:46:47 2005
@@ -1,5 +1,5 @@
 /***************************************************************************
- * $Id: itsSet.hpp,v 1.8 2005/03/26 09:17:38 nojhan Exp $
+ * $Id: itsSet.hpp,v 1.9 2005/03/26 11:46:47 nojhan Exp $
  * Author: Walid TFAILI <address@hidden>
  ****************************************************************************/
 
@@ -25,6 +25,8 @@
 #include <string>
 #include <hash_map.h>
 
+#include "logic.hpp"
+
 using namespace std;
  
 //! A common class for all sets of objects
@@ -36,18 +38,6 @@
 {
 protected:
 
-    //! The hash_map key equality function
-    /*! 
-      A binary predicate that determines whether two keys are equal.
-    */
-    struct eqstr
-    {
-      bool operator()(const char* s1, const char* s2) const
-      {
-        return strcmp(s1, s2) == 0;
-      }
-    };
-
   //! The collection of instance
   /*! 
     The collection hash map contains T classes.
Index: ometah/common/logic.cpp
diff -u ometah/common/logic.cpp:1.5 ometah/common/logic.cpp:1.6
--- ometah/common/logic.cpp:1.5 Sat Mar 26 09:20:09 2005
+++ ometah/common/logic.cpp     Sat Mar 26 11:46:47 2005
@@ -2,7 +2,7 @@
 /***************************************************************************
  *  logic.cpp
  *
- *  $Id: logic.cpp,v 1.5 2005/03/26 09:20:09 nojhan Exp $
+ *  $Id: logic.cpp,v 1.6 2005/03/26 11:46:47 nojhan Exp $
  *  Author : Johann Dréo <address@hidden>
  ****************************************************************************/
 
@@ -22,4 +22,5 @@
  *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  */
 
+#include <string>
 #include "logic.hpp"
Index: ometah/common/logic.hpp
diff -u ometah/common/logic.hpp:1.3 ometah/common/logic.hpp:1.4
--- ometah/common/logic.hpp:1.3 Sat Mar 26 09:17:38 2005
+++ ometah/common/logic.hpp     Sat Mar 26 11:46:47 2005
@@ -2,7 +2,7 @@
 /***************************************************************************
  *  logic.hpp
  *
- *  $Id: logic.hpp,v 1.3 2005/03/26 09:17:38 nojhan Exp $
+ *  $Id: logic.hpp,v 1.4 2005/03/26 11:46:47 nojhan Exp $
  *  Author : Johann Dréo <address@hidden>
  ****************************************************************************/
 
@@ -36,4 +36,14 @@
   }
 }
 
+
+struct eqstr
+{
+  bool operator()(const char* s1, const char* s2) const
+  {
+    return strcmp(s1, s2) == 0;
+  }
+};
+
+
 #endif
Index: ometah/communication/itsCommunicationClient.hpp
diff -u ometah/communication/itsCommunicationClient.hpp:1.6 
ometah/communication/itsCommunicationClient.hpp:1.7
--- ometah/communication/itsCommunicationClient.hpp:1.6 Sat Mar 26 09:17:38 2005
+++ ometah/communication/itsCommunicationClient.hpp     Sat Mar 26 11:46:47 2005
@@ -1,7 +1,7 @@
 /***************************************************************************
  *  itsCommunicationClientt.hpp
  *
- *  $Id: itsCommunicationClient.hpp,v 1.6 2005/03/26 09:17:38 nojhan Exp $
+ *  $Id: itsCommunicationClient.hpp,v 1.7 2005/03/26 11:46:47 nojhan Exp $
  *  Author : Johann Dréo <address@hidden>
  ****************************************************************************/
 
@@ -29,6 +29,7 @@
 #include <hash_map.h>
 #include "../communication/itsCommunication.hpp"
 #include "../communication/itsCommunicationServer.hpp"
+#include "../common/logic.hpp"
 
 class itsCommunicationClient : public itsCommunication
 {
@@ -37,7 +38,7 @@
     itsCommunicationServer* problem;
 
 public:
-    void initialization(hash_map<string,string> args);
+    void initialization(hash_map<string,string, eqstr> args);
 
     //! Call the problem on a point to get its associated values
     itsPoint call(itsPoint point);
Index: ometah/interface/ometah.cpp
diff -u ometah/interface/ometah.cpp:1.6 ometah/interface/ometah.cpp:1.7
--- ometah/interface/ometah.cpp:1.6     Sat Mar 26 09:17:38 2005
+++ ometah/interface/ometah.cpp Sat Mar 26 11:46:47 2005
@@ -1,5 +1,5 @@
 /***************************************************************************
- *  $Id: ometah.cpp,v 1.6 2005/03/26 09:17:38 nojhan Exp $
+ *  $Id: ometah.cpp,v 1.7 2005/03/26 11:46:47 nojhan Exp $
  *  Copyright : Université Paris 12 Val-de-Marne
  *  Author : Johann Dréo <address@hidden>
  ****************************************************************************/
@@ -25,7 +25,7 @@
  
 #include <hash_map.h>
 
-#include "../common/random.hpp"
+#include "../common/logic.hpp"
 
 #include "../common/itsSet.hpp"
 #include "../metaheuristic/itsMetaheuristic.hpp"
@@ -43,6 +43,7 @@
 
 using namespace std;
 
+
 int main(int argc, char* argv)
 {
 
@@ -125,7 +126,7 @@
     }
 
     // giving parameters
-    hash_map<string,string> parameters;
+    hash_map<string,string, eqstr> parameters;
     setCommunicationClient.item()->initialization( parameters );
     
     




reply via email to

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