SG++-Doxygen-Documentation
Loading...
Searching...
No Matches
python.learner.formatter.GridFormatter.GridFormatter Class Reference

Provides functionality for the runtime serialization of the Grid object. More...

Inheritance diagram for python.learner.formatter.GridFormatter.GridFormatter:

Public Member Functions

 deserialize (self, serializationStream)
 Deserializes the Grid memento object from the stream.
 
 deserializeFromFile (self, filename)
 Deserializes the Grid object from the file.
 
 serialize (self, memento, serializationStream)
 Serializes grid to the stream.
 
 serializeToFile (self, memento, filename)
 Serializes grid to the file.
 
 toString (self, memento)
 Returns a string that represents the Grid object.
 

Detailed Description

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.

Member Function Documentation

◆ deserialize()

◆ deserializeFromFile()

◆ serialize()

python.learner.formatter.GridFormatter.GridFormatter.serialize (   self,
  memento,
  serializationStream 
)

Serializes grid to the stream.

Parameters
mementothe Grid memento object
serializationStreamoutput stream where grid should be serialized to

References sgpp::base::GridDataBase.toString(), sgpp::base::HashGridIterator.toString(), sgpp::base::DataMatrix.toString(), sgpp::base::DataMatrixSP.toString(), sgpp::base::DataTensor.toString(), sgpp::base::DataVector.toString(), sgpp::base::DataVectorSP.toString(), sgpp::base::BoundingBox.toString(), sgpp::base::HashGridPoint.toString(), sgpp::base::HashGridStorage.toString(), sgpp::base::AdaptivityThresholdTypeParser.toString(), python.uq.analysis.KnowledgeTypes.KnowledgeTypes.toString(), sgpp::base::CoarseningFunctorTypeParser.toString(), sgpp::datadriven::DataSourceFileTypeParser.toString(), sgpp::datadriven::DataSourceShufflingTypeParser.toString(), sgpp::datadriven::DataTransformationTypeParser.toString(), sgpp::datadriven::DensityEstimationTypeParser.toString(), sgpp::datadriven::FitterTypeParser.toString(), sgpp::base::GridTypeParser.toString(), sgpp::datadriven::MatrixDecompositionTypeParser.toString(), sgpp::base::RefinementFunctorTypeParser.toString(), sgpp::datadriven::RegularizationTypeParser.toString(), sgpp::datadriven::ScorerMetricTypeParser.toString(), python.controller.InfoToFile.InfoToFile.toString(), python.controller.LearnerEventController.LearnerEventController.toString(), python.controller.SolverEventController.SolverEventController.toString(), python.data.DataContainer.DataContainer.toString(), python.data.DataSpecification.DataSpecification.toString(), python.learner.Learner.Learner.toString(), python.learner.solver.CGSolver.CGSolver.toString(), python.learner.TrainingSpecification.TrainingSpecification.toString(), python.learner.TrainingStopPolicy.TrainingStopPolicy.toString(), python.uq.learner.Learner.Learner.toString(), python.uq.refinement.AdmissibleSet.AdmissibleSparseGridNodeSet.toString(), python.uq.sampler.asgc.ASGCSamplerStopPolicy.ASGCSamplerStopPolicy.toString(), python.learner.formatter.GridFormatter.GridFormatter.toString(), python.learner.formatter.LearnedKnowledgeFormatter.LearnedKnowledgeFormatter.toString(), python.learner.formatter.LearnerFormatter.LearnerFormatter.toString(), python.uq.analysis.asgc.ASGCKnowledgeFormatter.ASGCKnowledgeFormatter.toString(), python.uq.sampler.asgc.ASGCSamplerFormatter.ASGCSamplerFormatter.toString(), python.uq.uq_setting.UQSettingFormatter.UQSettingFormatter.toString(), sgpp::base::GeneralGridTypeParser.toString(), sgpp::solver::SLESolverTypeParser.toString(), sgpp::base::HashGridPoint.toString(), sgpp::base::HashGridStorage.toString(), sgpp::base::DataMatrix.toString(), sgpp::base::DataMatrixSP.toString(), sgpp::base::DataTensor.toString(), sgpp::base::DataVector.toString(), sgpp::base::DataVectorSP.toString(), sgpp::base::BoundingBox.toString(), and sgpp::datadriven::VisualizationTypesParser.toString().

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().

◆ serializeToFile()

python.learner.formatter.GridFormatter.GridFormatter.serializeToFile (   self,
  memento,
  filename 
)

Serializes grid to the file.

Parameters
mementothe Grid memento object
filenameThe 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().

◆ toString()

python.learner.formatter.GridFormatter.GridFormatter.toString (   self,
  memento 
)

The documentation for this class was generated from the following file: