SG++-Doxygen-Documentation
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

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

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

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

Deserializes the LearnedKnowledgeMemento object from the stream.

Parameters
serializationStreamThe stream to deserialize.
Returns
The Grid object.

References python.learner.formatter.LearnedKnowledgeFormatter.LearnedKnowledgeFormatter.__readAlphaARFF().

Referenced by python.learner.formatter.LearnedKnowledgeFormatter.LearnedKnowledgeFormatter.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().

◆ deserializeFromFile()

◆ serialize()

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

Serializes the LearnedKnowledge memento object to the stream.

Parameters
mementoThe LearnedKnowledgeMemento object.
serializationStreamOutput stream where the LearnedKnowledgeMemento object should be serialized to.

References python.learner.formatter.LearnedKnowledgeFormatter.LearnedKnowledgeFormatter.__writeAlphaARFF().

Referenced by python.utils.GzipSerializer.GzipSerializer.serializeToFile(), python.learner.formatter.LearnerFormatter.LearnerFormatter.serializeToFile(), python.learner.formatter.LearnedKnowledgeFormatter.LearnedKnowledgeFormatter.serializeToFile(), python.uq.analysis.asgc.ASGCKnowledgeFormatter.ASGCKnowledgeFormatter.serializeToFile(), python.uq.sampler.asgc.ASGCSamplerFormatter.ASGCSamplerFormatter.serializeToFile(), and python.uq.uq_setting.UQSettingFormatter.UQSettingFormatter.serializeToFile().

◆ serializeToFile()

def 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(), python.learner.formatter.GridImageFormatter.GridImageFormatter.serialize(), 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(), python.learner.formatter.LearnedKnowledgeFormatter.LearnedKnowledgeFormatter.serialize(), sgpp::base::LinearClenshawCurtisGrid.serialize(), sgpp::base::ModLinearClenshawCurtisGrid.serialize(), sgpp::base::ModPolyClenshawCurtisGrid.serialize(), sgpp::base::PolyClenshawCurtisGrid.serialize(), sgpp::base::ModBsplineGrid.serialize(), sgpp::base::FundamentalSplineGrid.serialize(), sgpp::base::BsplineGrid.serialize(), sgpp::base::ModFundamentalSplineGrid.serialize(), sgpp::base::ModBsplineClenshawCurtisGrid.serialize(), sgpp::base::NakBsplineBoundaryCombigridGrid.serialize(), sgpp::base::BsplineClenshawCurtisGrid.serialize(), sgpp::base::HashGridPoint.serialize(), sgpp::base::BsplineBoundaryGrid.serialize(), sgpp::base::HashGridStorage.serialize(), sgpp::base::BoundingBox.serialize(), sgpp::base::Stretching.serialize(), and sgpp::base::Grid.serialize().

◆ toString()

def 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.uq.learner.Learner.Learner.createMemento(), and python.learner.Learner.Learner.createMemento().


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