22 #ifndef _SGSOLUTION_MAXMINMAX_HPP
23 #define _SGSOLUTION_MAXMINMAX_HPP
26 #include "sgiteration_maxminmax.hpp"
27 #include <boost/archive/text_iarchive.hpp>
28 #include <boost/archive/text_oarchive.hpp>
29 #include <boost/archive/binary_iarchive.hpp>
30 #include <boost/archive/binary_oarchive.hpp>
31 #include <boost/serialization/utility.hpp>
68 template<
class Archive>
69 void serialize(Archive &ar,
const unsigned int version)
77 std::ofstream ofs(filename,std::fstream::out);
81 boost::archive::binary_oarchive oa(ofs);
93 std::ifstream ifs(filename,std::fstream::in);
94 if (ifs.good() && ifs.is_open())
96 boost::archive::binary_iarchive ia(ifs);
105 friend class boost::serialization::access;
const SGGame & getGame() const
Get method for the game.
Definition: sgsolution_maxminmax.hpp:56
SGGame game
Definition: sgsolution_maxminmax.hpp:42
SGSolution_MaxMinMax()
Default constructor.
Definition: sgsolution_maxminmax.hpp:49
SGSolution_MaxMinMax(const SGGame &_game)
Initializes an SGSolution_MaxMinMax object with a copy of the SGGame _game.
Definition: sgsolution_maxminmax.hpp:51
Describes a stochastic game.
Definition: sggame.hpp:40
@ FAILED_OPEN
Definition: sgnamespace.hpp:32
SGSolve specific exceptions.
Definition: sgexception.hpp:36
void clear()
Definition: sgsolution_maxminmax.hpp:62
static void load(SGSolution_MaxMinMax &soln, const char *filename)
Static method for loading an SGSolution_MaxMinMax object from the file filename.
Definition: sgsolution_maxminmax.hpp:91
Records the progress of SGSolver_MaxMinMax::solve().
Definition: sgsolution_maxminmax.hpp:40
list< SGIteration_MaxMinMax > iterations
Definition: sgsolution_maxminmax.hpp:43
const list< SGIteration_MaxMinMax > & getIterations() const
Get method for the iterations.
Definition: sgsolution_maxminmax.hpp:58
static void save(const SGSolution_MaxMinMax &soln, const char *filename)
Static method for saving an SGSolution_MaxMinMax object to the file filename.
Definition: sgsolution_maxminmax.hpp:75
void serialize(Archive &ar, const unsigned int version)
Serializes the SGSolution_MaxMinMax object using boost.
Definition: sgsolution_maxminmax.hpp:69
Stores data on the behavior of SGSolver_MaxMinMax.
Definition: sgiteration_maxminmax.hpp:38
void push_back(const SGIteration_MaxMinMax &iteration)
Adds a new iteration to the back of SGSolution_MaxMinMax::iterations.
Definition: sgsolution_maxminmax.hpp:64
- src
- hpp
- sgsolution_maxminmax.hpp