![]() |
SG++-Doxygen-Documentation
|
Provides functionality for the runtime serialization of the LearnedKnowledge object. More...
Public Member Functions | |
deserialize (self, serializationStream) | |
Deserializes the LearnedKnowledgeMemento object from the stream. | |
deserializeFromFile (self, filename) | |
Deserializes the LearnedKnowledge memento object from the file. | |
serialize (self, memento, serializationStream) | |
Serializes the LearnedKnowledge memento object to the stream. | |
serializeToFile (self, memento, filename) | |
Serializes the LearnedKnowledge memento object to the file. | |
toString (self, memento) | |
Returns a string that represents the LearnedKnowledge memento object. | |
Provides functionality for the runtime serialization of the LearnedKnowledge object.
This design intends to separate the binary object representation and its business logic from the text representation that can be saved into file. The class is a part of Memento design pattern described in details in CheckpointController .
Currently, the LearnerKnowledge memento object is DataVector object with alpha values.
python.learner.formatter.LearnedKnowledgeFormatter.LearnedKnowledgeFormatter.deserialize | ( | self, | |
serializationStream | |||
) |
Deserializes the LearnedKnowledgeMemento object from the stream.
serializationStream | The stream to deserialize. |
References python.learner.formatter.LearnedKnowledgeFormatter.LearnedKnowledgeFormatter.__readAlphaARFF().
Referenced by python.learner.formatter.GridFormatter.GridFormatter.deserializeFromFile(), python.learner.formatter.LearnedKnowledgeFormatter.LearnedKnowledgeFormatter.deserializeFromFile(), python.uq.analysis.asgc.ASGCKnowledgeFormatter.ASGCKnowledgeFormatter.deserializeFromFile(), python.uq.sampler.asgc.ASGCSamplerFormatter.ASGCSamplerFormatter.deserializeFromFile(), python.uq.uq_setting.UQSettingFormatter.UQSettingFormatter.deserializeFromFile(), and python.utils.GzipSerializer.GzipSerializer.deserializeFromFile().
python.learner.formatter.LearnedKnowledgeFormatter.LearnedKnowledgeFormatter.deserializeFromFile | ( | self, | |
filename | |||
) |
Deserializes the LearnedKnowledge memento object from the file.
The file may or may be not gzip compressed.
filename | The name of file with serialized Grid. |
References python.learner.formatter.GridFormatter.GridFormatter.deserialize(), python.learner.formatter.GridImageFormatter.GridImageFormatter.deserialize(), python.learner.formatter.LearnedKnowledgeFormatter.LearnedKnowledgeFormatter.deserialize(), python.learner.formatter.LearnerFormatter.LearnerFormatter.deserialize(), python.uq.analysis.asgc.ASGCKnowledgeFormatter.ASGCKnowledgeFormatter.deserialize(), python.uq.sampler.asgc.ASGCSamplerFormatter.ASGCSamplerFormatter.deserialize(), python.uq.uq_setting.UQSettingFormatter.UQSettingFormatter.deserialize(), python.utils.GzipSerializer.GzipSerializer.deserialize(), json::JSON.deserialize(), and python.utils.GzipSerializer.GzipSerializer.gzOpen().
python.learner.formatter.LearnedKnowledgeFormatter.LearnedKnowledgeFormatter.serialize | ( | self, | |
memento, | |||
serializationStream | |||
) |
Serializes the LearnedKnowledge memento object to the stream.
memento | The LearnedKnowledgeMemento object. |
serializationStream | Output stream where the LearnedKnowledgeMemento object should be serialized to. |
References python.learner.formatter.LearnedKnowledgeFormatter.LearnedKnowledgeFormatter.__writeAlphaARFF().
Referenced by python.learner.formatter.GridFormatter.GridFormatter.serializeToFile(), python.learner.formatter.LearnedKnowledgeFormatter.LearnedKnowledgeFormatter.serializeToFile(), python.learner.formatter.LearnerFormatter.LearnerFormatter.serializeToFile(), python.uq.analysis.asgc.ASGCKnowledgeFormatter.ASGCKnowledgeFormatter.serializeToFile(), python.uq.sampler.asgc.ASGCSamplerFormatter.ASGCSamplerFormatter.serializeToFile(), python.uq.uq_setting.UQSettingFormatter.UQSettingFormatter.serializeToFile(), and python.utils.GzipSerializer.GzipSerializer.serializeToFile().
python.learner.formatter.LearnedKnowledgeFormatter.LearnedKnowledgeFormatter.serializeToFile | ( | self, | |
memento, | |||
filename | |||
) |
Serializes the LearnedKnowledge memento object to the file.
memento | LearnedKnowledgeMemento |
filename | The name of file where the Grid object should be serialized to. |
References python.utils.GzipSerializer.GzipSerializer.gzOpen(), json::JSON.serialize(), sgpp::base::Grid.serialize(), sgpp::base::BoundingBox.serialize(), sgpp::base::HashGridStorage.serialize(), sgpp::base::Stretching.serialize(), python.learner.formatter.GridFormatter.GridFormatter.serialize(), python.learner.formatter.LearnedKnowledgeFormatter.LearnedKnowledgeFormatter.serialize(), python.learner.formatter.LearnerFormatter.LearnerFormatter.serialize(), python.uq.analysis.asgc.ASGCKnowledgeFormatter.ASGCKnowledgeFormatter.serialize(), python.uq.sampler.asgc.ASGCSamplerFormatter.ASGCSamplerFormatter.serialize(), python.uq.uq_setting.UQSettingFormatter.UQSettingFormatter.serialize(), python.learner.formatter.GridImageFormatter.GridImageFormatter.serialize(), python.utils.GzipSerializer.GzipSerializer.serialize(), sgpp::base::Grid.serialize(), sgpp::base::BsplineBoundaryGrid.serialize(), sgpp::base::BsplineClenshawCurtisGrid.serialize(), sgpp::base::BsplineGrid.serialize(), sgpp::base::FundamentalNakSplineBoundaryGrid.serialize(), sgpp::base::FundamentalSplineBoundaryGrid.serialize(), sgpp::base::FundamentalSplineGrid.serialize(), sgpp::base::LinearBoundaryGrid.serialize(), sgpp::base::LinearClenshawCurtisBoundaryGrid.serialize(), sgpp::base::LinearClenshawCurtisGrid.serialize(), sgpp::base::ModBsplineClenshawCurtisGrid.serialize(), sgpp::base::ModBsplineGrid.serialize(), sgpp::base::ModFundamentalSplineGrid.serialize(), sgpp::base::ModLinearClenshawCurtisGrid.serialize(), sgpp::base::ModNakBsplineGrid.serialize(), sgpp::base::ModPolyClenshawCurtisGrid.serialize(), sgpp::base::ModPolyGrid.serialize(), sgpp::base::ModWeaklyFundamentalNakSplineGrid.serialize(), sgpp::base::NakBsplineBoundaryGrid.serialize(), sgpp::base::NakBsplineExtendedGrid.serialize(), sgpp::base::NakBsplineGrid.serialize(), sgpp::base::NakPBsplineGrid.serialize(), sgpp::base::NaturalBsplineBoundaryGrid.serialize(), sgpp::base::PolyBoundaryGrid.serialize(), sgpp::base::PolyClenshawCurtisBoundaryGrid.serialize(), sgpp::base::PolyClenshawCurtisGrid.serialize(), sgpp::base::PolyGrid.serialize(), sgpp::base::WeaklyFundamentalNakSplineBoundaryGrid.serialize(), sgpp::base::WeaklyFundamentalSplineBoundaryGrid.serialize(), sgpp::base::HashGridPoint.serialize(), sgpp::base::BoundingBox.serialize(), sgpp::base::HashGridStorage.serialize(), sgpp::base::Stretching.serialize(), json::DictNode.serialize(), json::IDNode.serialize(), json::JSON.serialize(), json::ListNode.serialize(), json::TextNode.serialize(), json::Node.serialize(), and sgpp::base::Grid.serialize().
python.learner.formatter.LearnedKnowledgeFormatter.LearnedKnowledgeFormatter.toString | ( | self, | |
memento | |||
) |
Returns a string that represents the LearnedKnowledge memento object.
memento | The LearnedKnowledgeMemento object. |
References python.learner.formatter.LearnedKnowledgeFormatter.LearnedKnowledgeFormatter.__readDataARFF().
Referenced by python.controller.LearnerEventController.LearnerEventController.__repr__(), python.controller.SolverEventController.SolverEventController.__repr__(), python.learner.Learner.Learner.createMemento(), python.uq.learner.Learner.Learner.createMemento(), and python.learner.formatter.GridFormatter.GridFormatter.serialize().