Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Kill unused operator<<.
authorArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Wed, 28 Oct 2020 16:13:43 +0000 (17:13 +0100)
committerArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Wed, 28 Oct 2020 16:40:55 +0000 (17:40 +0100)
Moreover, the output format doesn't match the input format expected in Profile::from_string.

src/kernel/resource/profile/DatedValue.cpp
src/kernel/resource/profile/DatedValue.hpp
src/kernel/resource/profile/StochasticDatedValue.cpp
src/kernel/resource/profile/StochasticDatedValue.hpp

index 68955de..61c386e 100644 (file)
@@ -14,11 +14,6 @@ bool DatedValue::operator==(DatedValue const& e2) const
 {
   return (fabs(date_ - e2.date_) < 0.0001) && (fabs(value_ - e2.value_) < 0.0001);
 }
-std::ostream& operator<<(std::ostream& out, const DatedValue& e)
-{
-  out << e.date_ << " " << e.value_;
-  return out;
-}
 
 } // namespace profile
 } // namespace kernel
index 6e5d32c..24b7540 100644 (file)
@@ -32,7 +32,6 @@ public:
   bool operator==(DatedValue const& e2) const;
   bool operator!=(DatedValue const& e2) const { return not(*this == e2); }
 };
-std::ostream& operator<<(std::ostream& out, const DatedValue& e);
 
 } // namespace profile
 } // namespace kernel
index a9e0d00..3cf0407 100644 (file)
@@ -50,26 +50,6 @@ bool StochasticDatedValue::operator==(StochasticDatedValue const& e2) const
          (e2.date_params == date_params);
 }
 
-std::ostream& operator<<(std::ostream& out, const StochasticDatedValue& e)
-{
-  out << e.date_law << " (";
-  for (unsigned int i = 0; i < e.date_params.size(); i++) {
-    out << e.date_params[i];
-    if (i != e.date_params.size() - 1) {
-      out << ",";
-    }
-  }
-  out << ") " << e.value_law << " (";
-  for (unsigned int i = 0; i < e.value_params.size(); i++) {
-    out << e.value_params[i];
-    if (i != e.value_params.size() - 1) {
-      out << ",";
-    }
-  }
-  out << ")";
-  return out;
-}
-
 } // namespace profile
 } // namespace kernel
 } // namespace simgrid
index 29bc989..4533bb3 100644 (file)
@@ -41,8 +41,6 @@ private:
   double draw(Distribution law, std::vector<double> params);
 };
 
-std::ostream& operator<<(std::ostream& out, const StochasticDatedValue& e);
-
 } // namespace profile
 } // namespace kernel
 } // namespace simgrid