SG++-Doxygen-Documentation
|
Provides functionality for the runtime serialization of the Grid object. More...
Public Member Functions | |
def | deserialize (self, serializationStream) |
Deserializes the Grid memento object from the stream. More... | |
def | deserializeFromFile (self, filename) |
Deserializes the Grid object from the file. More... | |
def | serialize (self, memento, serializationStream) |
Serializes grid to the stream. More... | |
def | serializeToFile (self, memento, filename) |
Serializes grid to the file. More... | |
def | toString (self, memento) |
Returns a string that represents the Grid object. More... | |
Provides functionality for the runtime serialization of the Grid 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 .
However strict separation of grid object and its representation is not implemented,as Formatter becomes from Grid object not a GridMemento object, but a string serialization of Grid itself. So Grid plays the role of GridMemento. The complete decoupling is a subject for future work.
def python.learner.formatter.GridFormatter.GridFormatter.deserialize | ( | self, | |
serializationStream | |||
) |
Deserializes the Grid memento object from the stream.
serializationStream | The stream to deserialize. |
Referenced by python.learner.formatter.LearnedKnowledgeFormatter.LearnedKnowledgeFormatter.deserializeFromFile(), python.learner.formatter.GridFormatter.GridFormatter.deserializeFromFile(), python.utils.GzipSerializer.GzipSerializer.deserializeFromFile(), python.uq.analysis.asgc.ASGCKnowledgeFormatter.ASGCKnowledgeFormatter.deserializeFromFile(), python.uq.sampler.asgc.ASGCSamplerFormatter.ASGCSamplerFormatter.deserializeFromFile(), and python.uq.uq_setting.UQSettingFormatter.UQSettingFormatter.deserializeFromFile().
def python.learner.formatter.GridFormatter.GridFormatter.deserializeFromFile | ( | self, | |
filename | |||
) |
Deserializes the Grid object from the file.
The file may or may be not gzip compressed.
filename | The name of file with serialized Grid. |
References sgpp::combigrid::AbstractSerializationStrategy< T >.deserialize(), python.learner.formatter.GridFormatter.GridFormatter.deserialize(), sgpp::combigrid::DefaultSerializationStrategy< T >.deserialize(), json::JSON.deserialize(), sgpp::combigrid::FloatSerializationStrategy< T >.deserialize(), sgpp::combigrid::AbstractCombigridStorage.deserialize(), sgpp::combigrid::CombigridTreeStorage.deserialize(), sgpp::combigrid::FunctionLookupTable.deserialize(), sgpp::combigrid::TreeStorageSerializationStrategy< T >.deserialize(), and python.utils.GzipSerializer.GzipSerializer.gzOpen().
def python.learner.formatter.GridFormatter.GridFormatter.serialize | ( | self, | |
memento, | |||
serializationStream | |||
) |
Serializes grid to the stream.
memento | the Grid memento object |
serializationStream | output stream where grid should be serialized to |
References python.controller.LearnerEventController.LearnerEventController.toString(), python.controller.SolverEventController.SolverEventController.toString(), python.controller.InfoToFile.InfoToFile.toString(), python.learner.formatter.GridFormatter.GridFormatter.toString(), python.data.DataSpecification.DataSpecification.toString(), sgpp::base::GridDataBase.toString(), sgpp::base::HashGridStorage.toString(), sgpp::base::HashGridIterator.toString(), sgpp::base::HashGridPoint.toString(), sgpp::base::BoundingBox.toString(), sgpp::base::DataVector.toString(), python.data.DataContainer.DataContainer.toString(), sgpp::base::DataVectorSP.toString(), sgpp::base::DataMatrixSP.toString(), and sgpp::base::DataMatrix.toString().
Referenced by python.utils.GzipSerializer.GzipSerializer.serializeToFile(), python.learner.formatter.LearnerFormatter.LearnerFormatter.serializeToFile(), python.learner.formatter.LearnedKnowledgeFormatter.LearnedKnowledgeFormatter.serializeToFile(), python.learner.formatter.GridFormatter.GridFormatter.serializeToFile(), python.uq.analysis.asgc.ASGCKnowledgeFormatter.ASGCKnowledgeFormatter.serializeToFile(), python.uq.sampler.asgc.ASGCSamplerFormatter.ASGCSamplerFormatter.serializeToFile(), and python.uq.uq_setting.UQSettingFormatter.UQSettingFormatter.serializeToFile().
def python.learner.formatter.GridFormatter.GridFormatter.serializeToFile | ( | self, | |
memento, | |||
filename | |||
) |
Serializes grid to the file.
memento | the Grid memento object |
filename | The name of file where the Grid object should be serialized to. |
References python.utils.GzipSerializer.GzipSerializer.gzOpen(), sgpp::combigrid::AbstractSerializationStrategy< T >.serialize(), sgpp::combigrid::DefaultSerializationStrategy< T >.serialize(), json::ListNode.serialize(), json::Node.serialize(), sgpp::combigrid::FloatSerializationStrategy< T >.serialize(), json::JSON.serialize(), json::DictNode.serialize(), sgpp::base::ModPolyGrid.serialize(), sgpp::base::PolyGrid.serialize(), json::TextNode.serialize(), json::IDNode.serialize(), sgpp::base::PolyBoundaryGrid.serialize(), sgpp::base::LinearClenshawCurtisBoundaryGrid.serialize(), sgpp::base::PolyClenshawCurtisBoundaryGrid.serialize(), sgpp::combigrid::TreeStorageSerializationStrategy< T >.serialize(), sgpp::combigrid::AbstractCombigridStorage.serialize(), python.learner.formatter.GridFormatter.GridFormatter.serialize(), sgpp::base::LinearBoundaryGrid.serialize(), sgpp::combigrid::CombigridTreeStorage.serialize(), sgpp::combigrid::FunctionLookupTable.serialize(), sgpp::base::LinearClenshawCurtisGrid.serialize(), sgpp::base::ModLinearClenshawCurtisGrid.serialize(), sgpp::base::PolyClenshawCurtisGrid.serialize(), sgpp::base::ModPolyClenshawCurtisGrid.serialize(), sgpp::base::ModFundamentalSplineGrid.serialize(), sgpp::base::BsplineGrid.serialize(), sgpp::base::FundamentalSplineGrid.serialize(), sgpp::base::ModBsplineGrid.serialize(), sgpp::base::ModBsplineClenshawCurtisGrid.serialize(), sgpp::base::BsplineClenshawCurtisGrid.serialize(), sgpp::base::NakBsplineBoundaryCombigridGrid.serialize(), sgpp::base::BsplineBoundaryGrid.serialize(), sgpp::base::HashGridPoint.serialize(), sgpp::base::HashGridStorage.serialize(), sgpp::base::BoundingBox.serialize(), sgpp::base::Stretching.serialize(), and sgpp::base::Grid.serialize().
def python.learner.formatter.GridFormatter.GridFormatter.toString | ( | self, | |
memento | |||
) |
Returns a string that represents the Grid object.
memento | The Grid memento object. |
Referenced by python.uq.learner.Learner.Learner.createMemento(), python.learner.Learner.Learner.createMemento(), and python.learner.formatter.GridFormatter.GridFormatter.serialize().