[Quantproject-developers] QuantProject/b7_Scripts/WalkForwardTesting/LinearCombination GenomeReprese
Brought to you by:
glauco_1
|
From: Glauco S. <gla...@us...> - 2005-07-29 13:36:38
|
Update of /cvsroot/quantproject/QuantProject/b7_Scripts/WalkForwardTesting/LinearCombination In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29183/b7_Scripts/WalkForwardTesting/LinearCombination Modified Files: GenomeRepresentation.cs Log Message: - the private member genome has been removed: much simpler serialization now - the public member FirstOptimizationDate has been added - the public member LastOptimizationDate has been added Index: GenomeRepresentation.cs =================================================================== RCS file: /cvsroot/quantproject/QuantProject/b7_Scripts/WalkForwardTesting/LinearCombination/GenomeRepresentation.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** GenomeRepresentation.cs 23 Jul 2005 17:58:43 -0000 1.1 --- GenomeRepresentation.cs 29 Jul 2005 13:36:28 -0000 1.2 *************** *** 34,38 **** public class GenomeRepresentation { ! private Genome genome; public string SignedTickers --- 34,42 ---- public class GenomeRepresentation { ! private double fitness; ! private string signedTickers; ! private int generationCounter; ! private DateTime firstOptimizationDate; ! private DateTime lastOptimizationDate; public string SignedTickers *************** *** 40,54 **** get { ! string signedTickers = ""; ! foreach ( string geneValue in (string[])genome.Meaning ) ! signedTickers += geneValue + ";"; ! signedTickers = signedTickers.Substring( 0 , ! signedTickers.Length - 1 ); ! return signedTickers; } } public double Fitness { ! get { return this.genome.Fitness; } } --- 44,68 ---- get { ! return this.signedTickers; } } public double Fitness { ! get { return this.fitness; } ! } ! public DateTime FirstOptimizationDate ! { ! get { return this.firstOptimizationDate; } ! } ! public DateTime LastOptimizationDate ! { ! get { return this.lastOptimizationDate; } ! } ! /// <summary> ! /// Number of the first generation containing the genome ! /// </summary> ! public int GenerationCounter ! { ! get { return this.generationCounter; } } *************** *** 76,82 **** return returnValue; } ! public GenomeRepresentation( Genome genome ) { ! this.genome = genome; } } --- 90,124 ---- return returnValue; } ! private string getSignedTickers( Genome genome ) { ! string signedTickers = ""; ! foreach ( string geneValue in (string[])genome.Meaning ) ! signedTickers += geneValue + ";"; ! signedTickers = signedTickers.Substring( 0 , ! signedTickers.Length - 1 ); ! return signedTickers; ! } ! private void genomeRepresentation( Genome genome , ! DateTime firstOptimizationDate , DateTime lastOptimizationDate , ! int generationCounter ) ! { ! this.fitness = genome.Fitness; ! this.signedTickers = this.getSignedTickers( genome ); ! this.firstOptimizationDate = firstOptimizationDate; ! this.lastOptimizationDate = lastOptimizationDate; ! this.generationCounter = generationCounter; ! } ! public GenomeRepresentation( Genome genome , ! DateTime firstOptimizationDate , DateTime lastOptimizationDate ) ! { ! this.genomeRepresentation( genome , ! firstOptimizationDate , lastOptimizationDate , -1 ); ! } ! public GenomeRepresentation( Genome genome , ! DateTime firstOptimizationDate , DateTime lastOptimizationDate , ! int generationCounter ) ! { ! this.genomeRepresentation( genome , firstOptimizationDate , ! lastOptimizationDate , generationCounter ); } } |