Grail (C#)  1.2.0
A multi-platform, modular, universal engine for embedding advanced AI in games.
Grail.SimulatedGames.DecisionTree.DecisionTreeStringListSerializer< TDecisionType > Class Template Reference

Used to serialize decision tree in a text mode into array of strings. Pass object of this type to the DecisionTree.Serialize method. More...

Inheritance diagram for Grail.SimulatedGames.DecisionTree.DecisionTreeStringListSerializer< TDecisionType >:
Collaboration diagram for Grail.SimulatedGames.DecisionTree.DecisionTreeStringListSerializer< TDecisionType >:

Public Member Functions

 DecisionTreeStringListSerializer (IDecisionStringSerializer< TDecisionType > actionSerializer)
 Constructs a new DecisionTreeBinarySerializer object. More...
 
string [] GetSerializedStrings ()
 This serializer stores serialized data internally. You can access it using this method. More...
 
void SetSerializedStrings (IEnumerable< string > newList)
 Use this method if you want to deserialize a decision tree. Pass the serialized representation of a decision tree and then call the DecisionTree.Deserialize() method. More...
 
void WriteToStream (StreamWriter writer)
 Once you have the tree serialized (and is stored in this object internally), you can write it to a stream. More...
 
void ReadFromStream (StreamReader reader)
 Use this method to read serialized decision tree from a stream. More...
 
void Print ()
 Prints the dataset to the standard output. More...
 
void Clear ()
 
override void SerializeChildrenCount (int count)
 
override void SerializeColumnIndex (int columnIndex)
 
override void SerializeNodeType (DecisionNodeType type)
 
override void SerializeValue (float value)
 
List< string > GetSerializedData ()
 
override void SerializeDecision (TDecisionType decision)
 
override DecisionNodeType DeserializeNodeType ()
 
override int DeserializeColumnIndex ()
 
override float DeserializeValue ()
 
override TDecisionType DeserializeDecision ()
 
override void Initialize ()
 
override int DeserializeChildrenCount ()
 
- Public Member Functions inherited from Grail.SimulatedGames.DecisionTree.IDecisionTreeSerializer< TDecisionType >
DecisionNode< TDecisionType > DeserializeNode ()
 

Detailed Description

Used to serialize decision tree in a text mode into array of strings. Pass object of this type to the DecisionTree.Serialize method.

Constructor & Destructor Documentation

◆ DecisionTreeStringListSerializer()

Constructs a new DecisionTreeBinarySerializer object.

Parameters
actionSerializerThe object that performs to-string serialization of actions.

Member Function Documentation

◆ GetSerializedStrings()

string [] Grail.SimulatedGames.DecisionTree.DecisionTreeStringListSerializer< TDecisionType >.GetSerializedStrings ( )

This serializer stores serialized data internally. You can access it using this method.

Returns
Serialized decision tree as array of strings.

◆ Print()

Prints the dataset to the standard output.

◆ ReadFromStream()

void Grail.SimulatedGames.DecisionTree.DecisionTreeStringListSerializer< TDecisionType >.ReadFromStream ( StreamReader  reader)
inline

Use this method to read serialized decision tree from a stream.

Parameters
writer

◆ SetSerializedStrings()

void Grail.SimulatedGames.DecisionTree.DecisionTreeStringListSerializer< TDecisionType >.SetSerializedStrings ( IEnumerable< string >  newList)
inline

Use this method if you want to deserialize a decision tree. Pass the serialized representation of a decision tree and then call the DecisionTree.Deserialize() method.

Parameters
newList

◆ WriteToStream()

void Grail.SimulatedGames.DecisionTree.DecisionTreeStringListSerializer< TDecisionType >.WriteToStream ( StreamWriter  writer)
inline

Once you have the tree serialized (and is stored in this object internally), you can write it to a stream.

Parameters
writer

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