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

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

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

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.
 

Detailed Description

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.

Member Function Documentation

◆ deserialize()

python.learner.formatter.LearnedKnowledgeFormatter.LearnedKnowledgeFormatter.deserialize (   self,
  serializationStream 
)

◆ deserializeFromFile()

◆ serialize()

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

◆ serializeToFile()

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

Serializes the LearnedKnowledge memento object to the file.

Parameters
mementoLearnedKnowledgeMemento
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.LearnedKnowledgeFormatter.LearnedKnowledgeFormatter.toString (   self,
  memento 
)

Returns a string that represents the LearnedKnowledge memento object.

Parameters
mementoThe LearnedKnowledgeMemento object.
Returns
A string that represents the LearnedKnowledge memento 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().


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