(C++)  1.0
A multi-platform, modular, universal engine for embedding advanced AI in games.
grail::simulation::DecisionTreeBinarySerializer< TDecisionType > Class Template Reference

Used to serialize decision tree in a binary mode. Pass object of this type to the DecisionTree.Serialize method. More...

#include <DecisionTreeBinarySerializer.hh>

Inheritance diagram for grail::simulation::DecisionTreeBinarySerializer< TDecisionType >:
Collaboration diagram for grail::simulation::DecisionTreeBinarySerializer< TDecisionType >:

Public Member Functions

 DecisionTreeBinarySerializer (std::unique_ptr< IDecisionBinarySerializer< TDecisionType >> actionSerializer, std::ostream *outStream)
 Constructs a new DecisionTreeBinarySerializer object. This constructor is used for serialization only. More...
 
 DecisionTreeBinarySerializer (std::unique_ptr< IDecisionBinarySerializer< TDecisionType >> actionSerializer, std::istream *inStream)
 Constructs a new DecisionTreeBinarySerializer object. This constructor is used for deserialization only. More...
 
template<class T >
void Write (T val)
 
template<class T >
Read ()
 
virtual void SerializeNodeType (DecisionNodeType nodeType) override
 Inherited from IDecisionTreeSerializer.
 
virtual DecisionNodeType DeserializeNodeType () override
 Inherited from IDecisionTreeSerializer.
 
virtual void SerializeColumnIndex (int columnIndex) override
 Inherited from IDecisionTreeSerializer.
 
virtual int DeserializeColumnIndex () override
 Inherited from IDecisionTreeSerializer.
 
virtual void SerializeValue (float value) override
 Inherited from IDecisionTreeSerializer.
 
virtual float DeserializeValue () override
 Inherited from IDecisionTreeSerializer.
 
virtual void SerializeChildrenCount (int count) override
 Inherited from IDecisionTreeSerializer.
 
virtual int DeserializeChildrenCount () override
 Inherited from IDecisionTreeSerializer.
 
virtual void SerializeDecision (const TDecisionType &decision) override
 Inherited from IDecisionTreeSerializer.
 
virtual std::unique_ptr< TDecisionType > DeserializeDecision () override
 Inherited from IDecisionTreeSerializer.
 
- Public Member Functions inherited from grail::simulation::IDecisionTreeSerializer< TDecisionType >
virtual void Initialize ()
 
void Serialize (DecisionNode< TDecisionType > &node)
 
void SerializeContinuousInnerDecisionNode (ContinuousInnerDecisionNode< TDecisionType > &node)
 
void SerializeNominalInnerDecisionNode (NominalInnerDecisionNode< TDecisionType > &node)
 
void SerializeLeafNode (LeafDecisionNode< TDecisionType > &node)
 
void DeserializeContinuousInnerDecisionNode (ContinuousInnerDecisionNode< TDecisionType > &node)
 
void DeserializeNominalInnerDecisionNode (NominalInnerDecisionNode< TDecisionType > &node)
 
std::unique_ptr< DecisionNode< TDecisionType > > DeserializeNode ()
 

Detailed Description

template<class TDecisionType>
class grail::simulation::DecisionTreeBinarySerializer< TDecisionType >

Used to serialize decision tree in a binary mode. Pass object of this type to the DecisionTree.Serialize method.

Constructor & Destructor Documentation

template<class TDecisionType >
grail::simulation::DecisionTreeBinarySerializer< TDecisionType >::DecisionTreeBinarySerializer ( std::unique_ptr< IDecisionBinarySerializer< TDecisionType >>  actionSerializer,
std::ostream *  outStream 
)
inline

Constructs a new DecisionTreeBinarySerializer object. This constructor is used for serialization only.

Parameters
actionSerializerThe object that performs binary serialization of actions.
outStreamStream the serializer will write to.
template<class TDecisionType >
grail::simulation::DecisionTreeBinarySerializer< TDecisionType >::DecisionTreeBinarySerializer ( std::unique_ptr< IDecisionBinarySerializer< TDecisionType >>  actionSerializer,
std::istream *  inStream 
)
inline

Constructs a new DecisionTreeBinarySerializer object. This constructor is used for deserialization only.

Parameters
actionSerializerThe object that performs binary serialization of actions.
inStreamStream the serializer will use to read from.

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