+bool Random::read_state(const std::string& filename)
+{
+ std::ifstream file(filename);
+ file >> mt19937_gen;
+ file.close();
+ if (file.fail())
+ XBT_WARN("Could not save the RNG state to file %s.", filename.c_str());
+ return not file.fail();
+}
+
+bool Random::write_state(const std::string& filename) const
+{
+ std::ofstream file(filename);
+ file << mt19937_gen;
+ file.close();
+ if (file.fail())
+ XBT_WARN("Could not read the RNG state from file %s.", filename.c_str());
+ return not file.fail();
+}
+