lmi-commits
[Top][All Lists]
Advanced

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

[lmi-commits] [lmi] master 56678f5 1/4: Remove two unneeded member funct


From: Greg Chicares
Subject: [lmi-commits] [lmi] master 56678f5 1/4: Remove two unneeded member functions [405]
Date: Mon, 30 Jan 2017 14:12:28 +0000 (UTC)

branch: master
commit 56678f5d788c9eeec41ee313aee888d2585c9442
Author: Gregory W. Chicares <address@hidden>
Commit: Gregory W. Chicares <address@hidden>

    Remove two unneeded member functions [405]
---
 input_sequence.cpp |   38 --------------------------------------
 input_sequence.hpp |    7 +------
 2 files changed, 1 insertion(+), 44 deletions(-)

diff --git a/input_sequence.cpp b/input_sequence.cpp
index 7ccea96..ede0422 100644
--- a/input_sequence.cpp
+++ b/input_sequence.cpp
@@ -1001,18 +1001,6 @@ std::vector<std::string> 
InputSequence::linear_keyword_representation() const
     return keyword_result;
 }
 
-std::string InputSequence::element_by_element_representation() const
-{
-// TODO ?? What if value is keyword?
-    std::ostringstream oss;
-    std::copy
-        (number_result.begin()
-        ,number_result.end()
-        ,std::ostream_iterator<double>(oss, " ")
-        );
-    return oss.str();
-}
-
 // Return a regularized representation using [x,y) interval notation.
 // TODO ?? This loses the variable nature of retirement age e.g.;
 //   do we want enumerators e.g. for such tokens?
@@ -1069,32 +1057,6 @@ std::string InputSequence::mathematical_representation() 
const
     return oss.str();
 }
 
-// Return a regularized representation readable by those uncomfortable
-// with [x,y) interval notation.
-std::string InputSequence::natural_language_representation() const
-{
-    std::ostringstream oss;
-    for(auto const& interval_i : intervals)
-        {
-        if(interval_i.value_is_keyword)
-            {
-            oss << interval_i.value_keyword;
-            }
-        else
-            {
-            oss << interval_i.value_number;
-            }
-        oss
-            << " from "
-            << interval_i.begin_duration
-            << " to "
-            << interval_i.end_duration
-            << "; "
-            ;
-        }
-    return oss.str();
-}
-
 std::vector<ValueInterval> const& InputSequence::interval_representation() 
const
 {
     return intervals;
diff --git a/input_sequence.hpp b/input_sequence.hpp
index 29679ef..1d9ce38 100644
--- a/input_sequence.hpp
+++ b/input_sequence.hpp
@@ -257,16 +257,11 @@ class LMI_SO InputSequence
         );
     ~InputSequence();
 
-    // SOMEDAY !! This probably ought to return a reference.
+    // SOMEDAY !! These probably ought to return const&.
     std::vector<double> linear_number_representation() const;
     std::vector<std::string> linear_keyword_representation() const;
-    std::string element_by_element_representation() const;
 
-    // SOMEDAY !! These two 'regularized representation' functions
-    // are probably not useful. The representation we care about is a
-    // std::vector<double>.
     std::string mathematical_representation() const;
-    std::string natural_language_representation() const;
 
     std::vector<ValueInterval> const& interval_representation() const;
 



reply via email to

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