22 #ifndef _SGSOLUTION_HPP
23 #define _SGSOLUTION_HPP
26 #include "sgiteration_pencilsharpening.hpp"
27 #include <boost/archive/text_iarchive.hpp>
28 #include <boost/archive/text_oarchive.hpp>
29 #include <boost/serialization/utility.hpp>
79 template<
class Archive>
80 void serialize(Archive &ar,
const unsigned int version)
88 std::ofstream ofs(filename,std::fstream::out);
92 boost::archive::text_oarchive oa(ofs);
102 std::ifstream ifs(filename,std::fstream::in);
103 if (ifs.good() && ifs.is_open())
105 boost::archive::text_iarchive ia(ifs);
112 friend class boost::serialization::access;
static void save(const SGSolution_PencilSharpening &soln, const char *filename)
Static method for saving an SGSolution object to the file filename.
Definition: sgsolution_pencilsharpening.hpp:86
const list< SGTuple > & getExtremeTuples() const
Get method for the extremeTuples.
Definition: sgsolution_pencilsharpening.hpp:63
const SGGame & getGame() const
Get method for the game.
Definition: sgsolution_pencilsharpening.hpp:59
static void load(SGSolution_PencilSharpening &soln, const char *filename)
Static method for loading an SGSolution object from the file filename.
Definition: sgsolution_pencilsharpening.hpp:100
list< SGIteration_PencilSharpening > iterations
Definition: sgsolution_pencilsharpening.hpp:44
Describes a stochastic game.
Definition: sggame.hpp:40
@ FAILED_OPEN
Definition: sgnamespace.hpp:32
const list< SGIteration_PencilSharpening > & getIterations() const
Get method for the iterations.
Definition: sgsolution_pencilsharpening.hpp:61
SGSolve specific exceptions.
Definition: sgexception.hpp:36
Records the progress of SGSolver::solve().
Definition: sgsolution_pencilsharpening.hpp:41
void serialize(Archive &ar, const unsigned int version)
Serializes the SGSolution object using boost.
Definition: sgsolution_pencilsharpening.hpp:80
list< SGTuple > extremeTuples
Definition: sgsolution_pencilsharpening.hpp:47
SGSolution_PencilSharpening()
Default constructor.
Definition: sgsolution_pencilsharpening.hpp:52
void clear()
Definition: sgsolution_pencilsharpening.hpp:67
void pop_back()
Pops the last tuple off of SGSolution::extremeTuples.
Definition: sgsolution_pencilsharpening.hpp:75
SGSolution_PencilSharpening(const SGGame &_game)
Initializes an SGSolution object with a copy of the SGGame _game.
Definition: sgsolution_pencilsharpening.hpp:54
Stores data on the behavior of SGApprox::generate()
Definition: sgiteration_pencilsharpening.hpp:43
void push_back(const SGTuple &tuple)
Adds a new tuple to the back of SGSolution::extremeTuples.
Definition: sgsolution_pencilsharpening.hpp:72
SGGame game
Definition: sgsolution_pencilsharpening.hpp:43
Definition: sgtuple.hpp:52
void push_back(const SGIteration_PencilSharpening &iteration)
Adds a new iteration to the back of SGSolution::iterations.
Definition: sgsolution_pencilsharpening.hpp:69
- src
- hpp
- sgsolution_pencilsharpening.hpp