C# Class SharpNeat.Genomes.Neat.NeatGenomeXmlIO

Static class for reading and writing NeatGenome(s) to and from XML.
显示文件 Open project: colgreen/sharpneat

Public Methods

Method Description
LoadCompleteGenomeList ( XmlNode xmlNode, bool nodeFnIds, NeatGenomeFactory genomeFactory ) : List

Loads a list of NeatGenome(s) from XML that has a containing 'Root' element. The root element also contains the activation function library that the network definitions are associated with.

LoadGenome ( XmlNode xmlNode, bool nodeFnIds ) : NeatGenome

Reads a NeatGenome from XML.

ReadCompleteGenomeList ( XmlReader xr, bool nodeFnIds, NeatGenomeFactory genomeFactory ) : List

Reads a list of NeatGenome(s) from XML that has a containing 'Root' element. The root element also contains the activation function library that the genomes are associated with.

ReadGenome ( XmlReader xr, bool nodeFnIds ) : NeatGenome

Reads a NeatGenome from XML.

Save ( NeatGenome genome, bool nodeFnIds ) : XmlDocument

Writes a single NeatGenome to XML. The XML is returned as a newly created XmlDocument.

SaveComplete ( IList genomeList, bool nodeFnIds ) : XmlDocument

Writes a list of NeatGenome(s) to XML within a containing 'Root' element and the activation function library that the genomes are associated with. The XML is returned as a newly created XmlDocument.

SaveComplete ( NeatGenome genome, bool nodeFnIds ) : XmlDocument

Writes a single NeatGenome to XML within a containing 'Root' element and the activation function library that the genome is associated with. The XML is returned as a newly created XmlDocument.

Write ( XmlWriter xw, NeatGenome genome, bool nodeFnIds ) : void

Writes a NeatGenome to XML.

WriteComplete ( XmlWriter xw, IList genomeList, bool nodeFnIds ) : void

Writes a list of NeatGenome(s) to XML within a containing 'Root' element and the activation function library that the genomes are associated with.

WriteComplete ( XmlWriter xw, NeatGenome genome, bool nodeFnIds ) : void

Writes a single NeatGenome to XML within a containing 'Root' element and the activation function library that the genome is associated with.

Method Details

LoadCompleteGenomeList() public static method

Loads a list of NeatGenome(s) from XML that has a containing 'Root' element. The root element also contains the activation function library that the network definitions are associated with.
public static LoadCompleteGenomeList ( XmlNode xmlNode, bool nodeFnIds, NeatGenomeFactory genomeFactory ) : List
xmlNode System.Xml.XmlNode The XmlNode to read from. This can be an XmlDocument or XmlElement.
nodeFnIds bool Indicates if node activation function IDs should be read. If false then /// all node activation function IDs default to 0.
genomeFactory NeatGenomeFactory A NeatGenomeFactory object to construct genomes against.
return List

LoadGenome() public static method

Reads a NeatGenome from XML.
public static LoadGenome ( XmlNode xmlNode, bool nodeFnIds ) : NeatGenome
xmlNode System.Xml.XmlNode The XmlNode to read from. This can be an XmlDocument or XmlElement.
nodeFnIds bool Indicates if node activation function IDs should be read. They are required /// for HyperNEAT genomes but not for NEAT
return NeatGenome

ReadCompleteGenomeList() public static method

Reads a list of NeatGenome(s) from XML that has a containing 'Root' element. The root element also contains the activation function library that the genomes are associated with.
public static ReadCompleteGenomeList ( XmlReader xr, bool nodeFnIds, NeatGenomeFactory genomeFactory ) : List
xr System.Xml.XmlReader The XmlReader to read from.
nodeFnIds bool Indicates if node activation function IDs should be read. If false then /// all node activation function IDs default to 0.
genomeFactory NeatGenomeFactory A NeatGenomeFactory object to construct genomes against.
return List

ReadGenome() public static method

Reads a NeatGenome from XML.
public static ReadGenome ( XmlReader xr, bool nodeFnIds ) : NeatGenome
xr System.Xml.XmlReader The XmlReader to read from.
nodeFnIds bool Indicates if node activation function IDs should be read. They are required /// for HyperNEAT genomes but not for NEAT
return NeatGenome

Save() public static method

Writes a single NeatGenome to XML. The XML is returned as a newly created XmlDocument.
public static Save ( NeatGenome genome, bool nodeFnIds ) : XmlDocument
genome NeatGenome The genome to save.
nodeFnIds bool Indicates if node activation function IDs should be emitted. They are required /// for HyperNEAT genomes but not for NEAT.
return System.Xml.XmlDocument

SaveComplete() public static method

Writes a list of NeatGenome(s) to XML within a containing 'Root' element and the activation function library that the genomes are associated with. The XML is returned as a newly created XmlDocument.
public static SaveComplete ( IList genomeList, bool nodeFnIds ) : XmlDocument
genomeList IList List of genomes to write as XML.
nodeFnIds bool Indicates if node activation function IDs should be emitted. They are required /// for HyperNEAT genomes but not for NEAT.
return System.Xml.XmlDocument

SaveComplete() public static method

Writes a single NeatGenome to XML within a containing 'Root' element and the activation function library that the genome is associated with. The XML is returned as a newly created XmlDocument.
public static SaveComplete ( NeatGenome genome, bool nodeFnIds ) : XmlDocument
genome NeatGenome The genome to save.
nodeFnIds bool Indicates if node activation function IDs should be emitted. They are required /// for HyperNEAT genomes but not for NEAT.
return System.Xml.XmlDocument

Write() public static method

Writes a NeatGenome to XML.
public static Write ( XmlWriter xw, NeatGenome genome, bool nodeFnIds ) : void
xw System.Xml.XmlWriter XmlWriter to write XML to.
genome NeatGenome Genome to write as XML.
nodeFnIds bool Indicates if node activation function IDs should be emitted. They are required /// for HyperNEAT genomes but not for NEAT.
return void

WriteComplete() public static method

Writes a list of NeatGenome(s) to XML within a containing 'Root' element and the activation function library that the genomes are associated with.
public static WriteComplete ( XmlWriter xw, IList genomeList, bool nodeFnIds ) : void
xw System.Xml.XmlWriter XmlWriter to write XML to.
genomeList IList List of genomes to write as XML.
nodeFnIds bool Indicates if node activation function IDs should be emitted. They are required /// for HyperNEAT genomes but not for NEAT.
return void

WriteComplete() public static method

Writes a single NeatGenome to XML within a containing 'Root' element and the activation function library that the genome is associated with.
public static WriteComplete ( XmlWriter xw, NeatGenome genome, bool nodeFnIds ) : void
xw System.Xml.XmlWriter XmlWriter to write XML to.
genome NeatGenome Genome to write as XML.
nodeFnIds bool Indicates if node activation function IDs should be emitted. They are required /// for HyperNEAT genomes but not for NEAT.
return void