]> AND Public Git Repository - simgrid.git/blobdiff - src/kernel/resource/profile/StochasticDatedValue.hpp
Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'wifi_clean' into 'master'
[simgrid.git] / src / kernel / resource / profile / StochasticDatedValue.hpp
index f4320390ccb65ef32bb7177cec64d615ad45d58b..27203b287e21609d5a39cdf79490d701d05779df 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2004-2020. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2004-2022. 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. */
@@ -7,12 +7,10 @@
 #define SIMGRID_KERNEL_PROFILE_STOCHASTICDATEDVALUE
 
 #include "simgrid/forward.h"
-#include "src/kernel/resource/profile/DatedValue.hpp"
+#include "simgrid/kernel/ProfileBuilder.hpp"
 #include <vector>
 
-namespace simgrid {
-namespace kernel {
-namespace profile {
+namespace simgrid::kernel::profile {
 
 enum class Distribution { EXP, NORM, UNIF, DET };
 
@@ -22,9 +20,9 @@ public:
   std::vector<double> date_params;
   Distribution value_law = Distribution::DET;
   std::vector<double> value_params;
-  DatedValue get_datedvalue();
-  double get_date();
-  double get_value();
+  DatedValue get_datedvalue() const;
+  double get_date() const;
+  double get_value() const;
   explicit StochasticDatedValue() = default;
   explicit StochasticDatedValue(double d, double v) : date_params({d}), value_params({v}) {}
   explicit StochasticDatedValue(Distribution dl, const std::vector<double>& dp, Distribution vl,
@@ -38,8 +36,8 @@ private:
   static double draw(Distribution law, std::vector<double> params);
 };
 
-} // namespace profile
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::profile
+
+std::vector<simgrid::kernel::profile::StochasticDatedValue> trace2selist( const char* c_str );
 
 #endif