Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Splitting trace_mgr into a file per class
[simgrid.git] / src / kernel / resource / profile / DatedValue.cpp
diff --git a/src/kernel/resource/profile/DatedValue.cpp b/src/kernel/resource/profile/DatedValue.cpp
new file mode 100644 (file)
index 0000000..b104af7
--- /dev/null
@@ -0,0 +1,25 @@
+/* Copyright (c) 2004-2019. The SimGrid Team. All rights reserved.          */
+
+/* This program is free software; you can redistribute it and/or modify it
+ * under the terms of the license (GNU LGPL) which comes with this package. */
+
+//#include "src/kernel/resource/profile/DatedValue.hpp"
+#include <math.h>
+
+namespace simgrid {
+namespace kernel {
+namespace profile {
+
+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
+} // namespace simgrid
\ No newline at end of file