Saves all the genes to the XML parameter.
Namespace: RSGeneticAlgorithm
Delphi
|
public
procedure SaveToXML( const GenoTypeXML: IXMLGenoType ); overload; virtual;
|
Parameters
GenoTypeXML
Type: IXMLGenoType
The following example saves the gene descriptions and the population to a stream:
Delphi
|
procedure SaveToStream(const Stream: TStream);
var
GAXML: IXMLGeneticAlgorithm;
begin
GAXML := NewGeneticAlgorithm;
RSGeneticAlgorithm1.Genes.SaveToXML( GAXML.Domain.GenoType );
RSGeneticAlgorithm1.Population.SaveToXML( GAXML.Domain.Chromosomes );
GAXML.OwnerDocument.SaveToStream(Stream);
end;
|
|