[mathic] 22/62: modified HashTable so that mathic will compile

Doug Torrance dtorrance-guest at moszumanska.debian.org
Wed Apr 1 11:36:19 UTC 2015


This is an automated email from the git hooks/post-receive script.

dtorrance-guest pushed a commit to branch master
in repository mathic.

commit 47dc9d4f40d33571895e91ab3238f06bb9008dc9
Author: Mike Stillman <mikestillman1 at gmail.com>
Date:   Wed Aug 1 12:31:40 2012 -0400

    modified HashTable so that mathic will compile
---
 src/mathic/HashTable.h | 15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)

diff --git a/src/mathic/HashTable.h b/src/mathic/HashTable.h
index 76d6ed6..399dfbc 100644
--- a/src/mathic/HashTable.h
+++ b/src/mathic/HashTable.h
@@ -11,8 +11,10 @@
 #ifndef MATHIC_HASHTABLE_GUARD
 #define MATHIC_HASHTABLE_GUARD
 
+#include <memtailor.h>
 #include "stdinc.h"
-
+#include <utility>
+#include <string>
 namespace mathic {
 
   template<class Configuration> 
@@ -35,9 +37,10 @@ namespace mathic {
   public:
     typedef C Configuration;
     typedef void * node;
-
+    typedef typename C::Key Key;
+    typedef typename C::Value Value;
     // Create a hash table
-    HashTable(Configuration &conf, unsigned int nbits = 10);
+    HashTable(const Configuration &conf, unsigned int nbits = 10);
 
     ~HashTable() {}
 
@@ -74,7 +77,7 @@ namespace mathic {
     std::string name() const;
 
   private:
-    struct node {
+    struct Node {
       Node *next;
       Key k;
       Value v;
@@ -97,7 +100,7 @@ namespace mathic {
   };
 
   template<class C>
-  HashTable::HashTable(const Configuration &conf, unsigned int nbits):
+  HashTable<C>::HashTable(const Configuration &conf, unsigned int nbits):
     mLogTableSize(nbits),
     mTableSize(1 << nbits),
     mHashMask((1 << nbits) - 1),
@@ -118,4 +121,6 @@ namespace mathic {
 
 // Local Variables:
 // indent-tabs-mode: nil
+// compile-command: "make -C $MATHIC/mathic "
 // End:
+

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/mathic.git



More information about the debian-science-commits mailing list