Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
b104af7cdc7d9760ec078506ebf350d631da6c13
[simgrid.git] / src / kernel / resource / profile / DatedValue.cpp
1 /* Copyright (c) 2004-2019. The SimGrid Team. All rights reserved.          */
2
3 /* This program is free software; you can redistribute it and/or modify it
4  * under the terms of the license (GNU LGPL) which comes with this package. */
5
6 //#include "src/kernel/resource/profile/DatedValue.hpp"
7 #include <math.h>
8
9 namespace simgrid {
10 namespace kernel {
11 namespace profile {
12
13 bool DatedValue::operator==(DatedValue const& e2) const
14 {
15   return (fabs(date_ - e2.date_) < 0.0001) && (fabs(value_ - e2.value_) < 0.0001);
16 }
17 std::ostream& operator<<(std::ostream& out, const DatedValue& e)
18 {
19   out << e.date_ << " " << e.value_;
20   return out;
21 }
22
23 } // namespace profile
24 } // namespace kernel
25 } // namespace simgrid