/// <summary> //// Compute the result for this ADF /// </summary> public double EvaluateAsDouble(GPProgram tree) { // // Only allow limited calling depth, to help speed up fitness // evaluation if (m_CallCount >= 1) { return(1.0); } m_CallCount++; double fResult = m_Root.EvaluateAsDouble(tree, this); m_CallCount--; return(fResult); }
/// <summary> /// Constructor where the settings for creating the ADF are specified. /// </summary> /// <param name="parent">Reference to the program this ADF belongs to</param> /// <param name="InitialDepth">Max depth an new tree can be constructed</param> /// <param name="WhichFunction">Numeric indicator of "which" ADF this is in the program</param> /// <param name="NumberArgs">Count of arguments this ADF will accept</param> public GPProgramBranchADF(GPProgram parent, int InitialDepth, short WhichADF, byte NumberArgs) : base(parent, InitialDepth, WhichADF, NumberArgs) { }