[dasher: 4/16] Removed LanguageModel::GetMemory.



commit 99aa01a4b0ff4cbce79eec6dd3e8c340a5da019b
Author: Alan Lawrence <acl33 inf phy cam ac uk>
Date:   Wed Jul 29 17:03:47 2009 +0100

    Removed LanguageModel::GetMemory.
    
    Sorry but a 'virtual' metric incomparable between subclasses seems of little use

 .../LanguageModelling/CTWLanguageModel.h           |    4 ----
 .../LanguageModelling/DictLanguageModel.h          |    4 +---
 .../LanguageModelling/JapaneseLanguageModel.h      |    4 ----
 Src/DasherCore/LanguageModelling/LanguageModel.h   |   14 --------------
 .../LanguageModelling/MixtureLanguageModel.h       |   10 ----------
 .../LanguageModelling/PPMLanguageModel.h           |    4 ----
 .../LanguageModelling/PPMPYLanguageModel.h         |    4 ----
 .../LanguageModelling/WordLanguageModel.h          |    4 +---
 8 files changed, 2 insertions(+), 46 deletions(-)
---
diff --git a/Src/DasherCore/LanguageModelling/CTWLanguageModel.h b/Src/DasherCore/LanguageModelling/CTWLanguageModel.h
index 2a304cb..5d2746d 100644
--- a/Src/DasherCore/LanguageModelling/CTWLanguageModel.h
+++ b/Src/DasherCore/LanguageModelling/CTWLanguageModel.h
@@ -50,10 +50,6 @@ namespace Dasher {
 	virtual void LearnSymbol(Context context, int Symbol); 	
 	virtual void GetProbs(Context context, std::vector < unsigned int >&Probs, int Norm, int iUniform) const; 
 	
-	virtual int GetMemory() {			
-		return 0;		
-	}
-
 	Dasher::CHashTable HashTable; // Hashtable used for storing CCTWNodes in an array
       unsigned int MaxDepth;	// Maximum depth of the tree
 	int MaxTries;	// Determines how many times to try to find an empty index for a new node (max number of collisions)
diff --git a/Src/DasherCore/LanguageModelling/DictLanguageModel.h b/Src/DasherCore/LanguageModelling/DictLanguageModel.h
index d6133cb..d0c5dba 100644
--- a/Src/DasherCore/LanguageModelling/DictLanguageModel.h
+++ b/Src/DasherCore/LanguageModelling/DictLanguageModel.h
@@ -42,9 +42,7 @@ namespace Dasher {
       EnterSymbol(context, Symbol);
     };                          // Never learn in this model
 
-    virtual int GetMemory() {
-      return NodesAllocated;
-  } private:
+  private:
 
     void MyLearnSymbol(Context context, int Symbol);
 
diff --git a/Src/DasherCore/LanguageModelling/JapaneseLanguageModel.h b/Src/DasherCore/LanguageModelling/JapaneseLanguageModel.h
index 99de626..714789f 100644
--- a/Src/DasherCore/LanguageModelling/JapaneseLanguageModel.h
+++ b/Src/DasherCore/LanguageModelling/JapaneseLanguageModel.h
@@ -35,10 +35,6 @@ namespace Dasher {
 
     void dump();
 
-    virtual int GetMemory() {
-      return NodesAllocated;
-    }
-
   private:
 
     class CPPMnode {
diff --git a/Src/DasherCore/LanguageModelling/LanguageModel.h b/Src/DasherCore/LanguageModelling/LanguageModel.h
index 949a52d..684e3a7 100644
--- a/Src/DasherCore/LanguageModelling/LanguageModel.h
+++ b/Src/DasherCore/LanguageModelling/LanguageModel.h
@@ -104,20 +104,6 @@ public:
 
   /// @}
 
-  /// @name Status reporting
-  /// Return information useful for debugging purposes
-  /// @{
-
-  /// Get some measure of the memory usage for diagnostic
-  /// purposes. No need to implement this if you're not comparing
-  /// language models. The exact meaning of the result will
-  /// depend on the implementation (for example, could be the
-  /// number of nodes in a trie, or the physical memory usage).
-
-  virtual int GetMemory() = 0;
-
-  /// @}
-
   /// @name Persistant storage
   /// Binary representation of language model state
   /// @{
diff --git a/Src/DasherCore/LanguageModelling/MixtureLanguageModel.h b/Src/DasherCore/LanguageModelling/MixtureLanguageModel.h
index 015e99a..7a78907 100644
--- a/Src/DasherCore/LanguageModelling/MixtureLanguageModel.h
+++ b/Src/DasherCore/LanguageModelling/MixtureLanguageModel.h
@@ -98,16 +98,6 @@ namespace Dasher {
         Probs[i] = ProbsA[i] + ProbsB[i];
     }};
 
-    // Get some measure of the memory usage for diagnostic
-    // purposes. No need to implement this if you're not comparing
-    // language models. The exact meaning of the result will
-    // depend on the implementation (for example, could be the
-    // number of nodes in a trie, or the physical memory usage).
-
-    virtual int GetMemory() {
-      return 0;
-    };
-
   private:
     CLanguageModel * lma;
     CLanguageModel *lmb;
diff --git a/Src/DasherCore/LanguageModelling/PPMLanguageModel.h b/Src/DasherCore/LanguageModelling/PPMLanguageModel.h
index 73cae77..c149b21 100644
--- a/Src/DasherCore/LanguageModelling/PPMLanguageModel.h
+++ b/Src/DasherCore/LanguageModelling/PPMLanguageModel.h
@@ -45,10 +45,6 @@ namespace Dasher {
 
     void dump();
 
-    virtual int GetMemory() {
-      return NodesAllocated;
-    }
-
     class CPPMnode {
     public:
       CPPMnode * find_symbol(int sym)const;
diff --git a/Src/DasherCore/LanguageModelling/PPMPYLanguageModel.h b/Src/DasherCore/LanguageModelling/PPMPYLanguageModel.h
index fd0c499..9e4174a 100644
--- a/Src/DasherCore/LanguageModelling/PPMPYLanguageModel.h
+++ b/Src/DasherCore/LanguageModelling/PPMPYLanguageModel.h
@@ -63,10 +63,6 @@ namespace Dasher {
 
     void dump();
 
-    virtual int GetMemory() {
-      return NodesAllocated;
-    }
-
     class CPPMnode {
     public:
       CPPMnode * find_symbol(int sym)const;
diff --git a/Src/DasherCore/LanguageModelling/WordLanguageModel.h b/Src/DasherCore/LanguageModelling/WordLanguageModel.h
index 62c7d7d..c3c63ed 100644
--- a/Src/DasherCore/LanguageModelling/WordLanguageModel.h
+++ b/Src/DasherCore/LanguageModelling/WordLanguageModel.h
@@ -47,9 +47,7 @@ namespace Dasher {
     virtual void EnterSymbol(Context context, int Symbol);
     virtual void LearnSymbol(Context context, int Symbol);
 
-    virtual int GetMemory() {
-      return NodesAllocated;
-  } private:
+  private:
 
       class CWordnode {
     public:



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